|
@@ -58,6 +58,9 @@ def monitor_light_mode_selector(value=None, old_value=None):
|
|
|
elif value == 'Morning':
|
|
elif value == 'Morning':
|
|
|
log.info("Go to Morning")
|
|
log.info("Go to Morning")
|
|
|
pyscript.state_goto_morning()
|
|
pyscript.state_goto_morning()
|
|
|
|
|
+ elif value == 'Dimmed morning':
|
|
|
|
|
+ log.info("Go to Dimmed morning")
|
|
|
|
|
+ pyscript.state_goto_dimmed_morning()
|
|
|
elif value == 'Windows':
|
|
elif value == 'Windows':
|
|
|
log.info("Go to Windows")
|
|
log.info("Go to Windows")
|
|
|
pyscript.state_goto_window()
|
|
pyscript.state_goto_window()
|
|
@@ -159,7 +162,8 @@ def state_goto_morning():
|
|
|
switch.turn_on(entity_id='switch.matsal_altandorr')
|
|
switch.turn_on(entity_id='switch.matsal_altandorr')
|
|
|
switch.turn_off(entity_id='switch.matsal_piano')
|
|
switch.turn_off(entity_id='switch.matsal_piano')
|
|
|
if( isChristmas ):
|
|
if( isChristmas ):
|
|
|
- switch.turn_on(entity_id='switch.koksfonster')
|
|
|
|
|
|
|
+ switch.turn_off(entity_id='switch.koksfonster')
|
|
|
|
|
+ #switch.turn_on(entity_id='switch.koksfonster')
|
|
|
else:
|
|
else:
|
|
|
switch.turn_off(entity_id='switch.koksfonster')
|
|
switch.turn_off(entity_id='switch.koksfonster')
|
|
|
light.turn_off(entity_id='light.hall_inner')
|
|
light.turn_off(entity_id='light.hall_inner')
|
|
@@ -169,6 +173,34 @@ def state_goto_morning():
|
|
|
light.turn_off(entity_id='light.shellydimmer1')
|
|
light.turn_off(entity_id='light.shellydimmer1')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ for x in range(2):
|
|
|
|
|
+ task.sleep(0.5)
|
|
|
|
|
+ if( isChristmas ):
|
|
|
|
|
+ light.turn_off(entity_id=' light.main_button_4') # Christmas lights
|
|
|
|
|
+ task.sleep(0.5)
|
|
|
|
|
+
|
|
|
|
|
+ pyscript.kitchen_worklights_button_trigger()
|
|
|
|
|
+ #pyscript.handle_bedroom_light()
|
|
|
|
|
+
|
|
|
|
|
+@service
|
|
|
|
|
+def state_goto_dimmed_morning():
|
|
|
|
|
+ task.unique('state_goto_py')
|
|
|
|
|
+ isChristmas = True if input_boolean.christmas == 'on' else False
|
|
|
|
|
+ log.info(f"********* DIMMED MORNING *********** State:{input_select.light_mode} Jul:{isChristmas}")
|
|
|
|
|
+ light.turn_off(entity_id='light.tradfri_bulb')
|
|
|
|
|
+ switch.turn_off(entity_id='switch.matsal_altandorr')
|
|
|
|
|
+ switch.turn_off(entity_id='switch.matsal_piano')
|
|
|
|
|
+ if( isChristmas ):
|
|
|
|
|
+ switch.turn_off(entity_id='switch.koksfonster')
|
|
|
|
|
+ else:
|
|
|
|
|
+ switch.turn_off(entity_id='switch.koksfonster')
|
|
|
|
|
+ light.turn_off(entity_id='light.hall_inner')
|
|
|
|
|
+ light.turn_on(entity_id='light.hall_door', brightness=3, color_temp_kelvin=2202)
|
|
|
|
|
+ light.turn_off(entity_id='light.rislampa')
|
|
|
|
|
+ switch.turn_off(entity_id='switch.sovrum')
|
|
|
|
|
+ light.turn_off(entity_id='light.shellydimmer1')
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
for x in range(2):
|
|
for x in range(2):
|
|
|
task.sleep(0.5)
|
|
task.sleep(0.5)
|
|
|
if( isChristmas ):
|
|
if( isChristmas ):
|