|
@@ -28,6 +28,8 @@ def state_goto_all_on():
|
|
|
cs = getCurrentState()
|
|
|
log.info(f"********* ALL ON *********** State: " + str(cs) )
|
|
|
light.turn_on(entity_id='light.tradfri_bulb') # Stora flyglampan
|
|
|
+ light.turn_on(entity_id='light.hall_inner')
|
|
|
+ light.turn_on(entity_id='light.hall_door')
|
|
|
#switch.turn_on(entity_id='switch.matsal')
|
|
|
for x in range(2):
|
|
|
switch.turn_on(entity_id='switch.group_button_all')
|
|
@@ -47,6 +49,9 @@ def state_goto_window():
|
|
|
log.info(f"********* WINDOW *********** State: " + str(cs) )
|
|
|
light.turn_off(entity_id='light.tradfri_bulb')
|
|
|
switch.turn_off(entity_id='switch.matsal')
|
|
|
+ light.turn_off(entity_id='light.hall_inner')
|
|
|
+ light.turn_off(entity_id='light.hall_door')
|
|
|
+
|
|
|
|
|
|
if cs == 4 or cs == 2: # From Off or already Window
|
|
|
for x in range(2):
|
|
@@ -79,6 +84,9 @@ def state_goto_morning():
|
|
|
log.info(f"********* MORNING *********** State: " + str(cs) )
|
|
|
light.turn_off(entity_id='light.tradfri_bulb')
|
|
|
switch.turn_off(entity_id='switch.matsal')
|
|
|
+ light.turn_off(entity_id='light.hall_inner')
|
|
|
+ light.turn_on(entity_id='light.hall_door')
|
|
|
+
|
|
|
if cs == 4 or cs == 3: # Off or already Morning
|
|
|
for x in range(2):
|
|
|
light.turn_on(entity_id=' light.main_button_4')
|
|
@@ -113,6 +121,9 @@ def state_goto_all_off():
|
|
|
cs = getCurrentState()
|
|
|
log.info(f"********* ALL OFF *********** State: " + str(cs) )
|
|
|
light.turn_off(entity_id='light.tradfri_bulb')
|
|
|
+ light.turn_off(entity_id='light.hall_inner')
|
|
|
+ light.turn_off(entity_id='light.hall_door')
|
|
|
+
|
|
|
#switch.turn_off(entity_id='switch.matsal') # Temp disable when high energy prices
|
|
|
#switch.turn_off(entity_id='switch.tradfri_outlet') # Sovrum OFF # Temp disable when high energy prices
|
|
|
for x in range(2):
|