#######################################################
# 
# SmartHomeControl.py
# Python implementation of the Class SmartHomeControl
# Generated by Enterprise Architect
# Created on:      29-6��-2021 11:26:32
# Original author: 70748
# 
#######################################################
from smart_home_v2.src.ControlButton import ControlButton

class SmartHomeControl:
    def __init__(self) -> None:
        self.buttons: list[ControlButton] = list()

    def addControlButton(self, button: ControlButton):
        self.buttons.append(button)

    def clickButton(self, index: int):
        selectedBtn = self.buttons[index]
        selectedBtn.onClick()

    def longPressButton(self, index: int):
        selectedBtn = self.buttons[index]
        selectedBtn.onLongPress()