Sunset lights no longer shuts off unrelated lights, close #84
This commit is contained in:
Submodule node-red/projects/NerdFlows updated: aa9585edea...5fc2d0a20c
@ -1379,33 +1379,50 @@ script:
|
|||||||
entity_id: input_boolean.give_me_darkness
|
entity_id: input_boolean.give_me_darkness
|
||||||
state: 'off'
|
state: 'off'
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_off
|
|
||||||
target:
|
|
||||||
entity_id:
|
|
||||||
- light.dining_room_lamp
|
|
||||||
- if:
|
- if:
|
||||||
- condition: state
|
- condition: template
|
||||||
entity_id: timer.downstairs_bathroom_lights_timer
|
value_template: "{{ sunset_lights == 1 }}"
|
||||||
state: idle
|
|
||||||
then:
|
then:
|
||||||
|
- service: light.turn_on
|
||||||
|
target:
|
||||||
|
entity_id:
|
||||||
|
- light.living_room_lights
|
||||||
|
- light.mud_room_overhead
|
||||||
|
- service: input_select.select_option
|
||||||
|
target:
|
||||||
|
entity_id:
|
||||||
|
- input_select.living_room_scenes
|
||||||
|
- input_select.mud_room_scenes
|
||||||
|
data:
|
||||||
|
option: Adaptive
|
||||||
|
else:
|
||||||
- service: light.turn_off
|
- service: light.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: light.downstairs_bathroom_lights
|
entity_id:
|
||||||
- service: input_boolean.turn_off
|
- light.dining_room_lamp
|
||||||
target:
|
- if:
|
||||||
entity_id: input_boolean.tina_desk_lights
|
- condition: state
|
||||||
- service: light.turn_on
|
entity_id: timer.downstairs_bathroom_lights_timer
|
||||||
target:
|
state: idle
|
||||||
entity_id:
|
then:
|
||||||
- light.living_room_lights
|
- service: light.turn_off
|
||||||
- light.mud_room_overhead
|
target:
|
||||||
- service: input_select.select_option
|
entity_id: light.downstairs_bathroom_lights
|
||||||
target:
|
- service: input_boolean.turn_off
|
||||||
entity_id:
|
target:
|
||||||
- input_select.living_room_scenes
|
entity_id: input_boolean.tina_desk_lights
|
||||||
- input_select.mud_room_scenes
|
- service: light.turn_on
|
||||||
data:
|
target:
|
||||||
option: Adaptive
|
entity_id:
|
||||||
|
- light.living_room_lights
|
||||||
|
- light.mud_room_overhead
|
||||||
|
- service: input_select.select_option
|
||||||
|
target:
|
||||||
|
entity_id:
|
||||||
|
- input_select.living_room_scenes
|
||||||
|
- input_select.mud_room_scenes
|
||||||
|
data:
|
||||||
|
option: Adaptive
|
||||||
|
|
||||||
evening_on_second_floor:
|
evening_on_second_floor:
|
||||||
alias: 'Evening on Second Floor'
|
alias: 'Evening on Second Floor'
|
||||||
@ -1476,12 +1493,6 @@ script:
|
|||||||
entity_id: input_boolean.give_me_darkness
|
entity_id: input_boolean.give_me_darkness
|
||||||
state: 'off'
|
state: 'off'
|
||||||
sequence:
|
sequence:
|
||||||
- service: light.turn_off
|
|
||||||
target:
|
|
||||||
area_id:
|
|
||||||
- master_bedroom
|
|
||||||
- kallen_bedroom
|
|
||||||
- emma_bedroom
|
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
target:
|
target:
|
||||||
entity_id: input_select.upstairs_hallway_scenes
|
entity_id: input_select.upstairs_hallway_scenes
|
||||||
@ -1502,28 +1513,40 @@ script:
|
|||||||
{% else %}
|
{% else %}
|
||||||
Nightlight
|
Nightlight
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- delay:
|
- if:
|
||||||
seconds: 1
|
- condition: template
|
||||||
- service: switch.turn_on
|
value_template: "{{ sunset_lights == 1 }}"
|
||||||
target:
|
then:
|
||||||
entity_id:
|
- stop: "Sunset lights don't mess with bedroom light states before bedtime"
|
||||||
- switch.adaptive_lighting_kallen_bedroom
|
else:
|
||||||
- switch.adaptive_lighting_master_bedroom
|
- service: light.turn_off
|
||||||
- switch.adaptive_lighting_emma_bedroom
|
target:
|
||||||
- service: switch.turn_off
|
area_id:
|
||||||
target:
|
- master_bedroom
|
||||||
entity_id:
|
- kallen_bedroom
|
||||||
- switch.adaptive_lighting_sleep_mode_kallen_bedroom
|
- emma_bedroom
|
||||||
- switch.adaptive_lighting_sleep_mode_master_bedroom
|
- delay:
|
||||||
- switch.adaptive_lighting_sleep_mode_emma_bedroom
|
seconds: 1
|
||||||
- service: input_text.set_value
|
- service: switch.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_text.kallen_bedroom_selected_scene
|
- switch.adaptive_lighting_kallen_bedroom
|
||||||
- input_text.master_bedroom_selected_scene
|
- switch.adaptive_lighting_master_bedroom
|
||||||
- input_text.emma_bedroom_selected_scene
|
- switch.adaptive_lighting_emma_bedroom
|
||||||
data:
|
- service: switch.turn_off
|
||||||
value: Adaptive
|
target:
|
||||||
|
entity_id:
|
||||||
|
- switch.adaptive_lighting_sleep_mode_kallen_bedroom
|
||||||
|
- switch.adaptive_lighting_sleep_mode_master_bedroom
|
||||||
|
- switch.adaptive_lighting_sleep_mode_emma_bedroom
|
||||||
|
- service: input_text.set_value
|
||||||
|
target:
|
||||||
|
entity_id:
|
||||||
|
- input_text.kallen_bedroom_selected_scene
|
||||||
|
- input_text.master_bedroom_selected_scene
|
||||||
|
- input_text.emma_bedroom_selected_scene
|
||||||
|
data:
|
||||||
|
value: Adaptive
|
||||||
|
|
||||||
morning_scene:
|
morning_scene:
|
||||||
alias: 'Morning Scene'
|
alias: 'Morning Scene'
|
||||||
|
Reference in New Issue
Block a user