|
@@ -28,6 +28,7 @@ def state_goto_all_on():
|
|
|
cs = getCurrentState()
|
|
|
log.info(f"********* ALL ON *********** State: " + str(cs) )
|
|
|
light.turn_on(entity_id='light.tradfri_bulb')
|
|
|
+ switch.turn_on(entity_id='switch.matsal')
|
|
|
for x in range(2):
|
|
|
switch.turn_on(entity_id='switch.group_button_all')
|
|
|
task.sleep(0.5)
|
|
@@ -45,6 +46,7 @@ def state_goto_window():
|
|
|
cs = getCurrentState()
|
|
|
log.info(f"********* WINDOW *********** State: " + str(cs) )
|
|
|
light.turn_off(entity_id='light.tradfri_bulb')
|
|
|
+ switch.turn_off(entity_id='switch.matsal')
|
|
|
|
|
|
if cs == 4 or cs == 2: # From Off or already Window
|
|
|
for x in range(2):
|
|
@@ -76,6 +78,7 @@ def state_goto_morning():
|
|
|
cs = getCurrentState()
|
|
|
log.info(f"********* MORNING *********** State: " + str(cs) )
|
|
|
light.turn_off(entity_id='light.tradfri_bulb')
|
|
|
+ switch.turn_off(entity_id='switch.matsal')
|
|
|
if cs == 4 or cs == 3: # Off or already Morning
|
|
|
for x in range(2):
|
|
|
light.turn_on(entity_id=' light.main_button_4')
|
|
@@ -110,6 +113,7 @@ def state_goto_all_off():
|
|
|
cs = getCurrentState()
|
|
|
log.info(f"********* ALL OFF *********** State: " + str(cs) )
|
|
|
light.turn_off(entity_id='light.tradfri_bulb')
|
|
|
+ switch.turn_off(entity_id='switch.matsal')
|
|
|
switch.turn_off(entity_id='switch.tradfri_outlet') # Sovrum OFF
|
|
|
for x in range(2):
|
|
|
switch.turn_off(entity_id='switch.group_button_all')
|