Adjust master bedroom/second floor lighting while sleeping #176
This commit is contained in:
@ -76,6 +76,13 @@ script:
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id: switch.adaptive_lighting_master_bedroom
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ is_state('input_boolean.give_me_darkness','on') and is_state('input_boolean.goodnight','off') }}"
|
||||
then:
|
||||
- service: script.turn_on
|
||||
target:
|
||||
entity_id: script.evening_on_second_floor
|
||||
- delay:
|
||||
seconds: 1
|
||||
- service: light.turn_on
|
||||
@ -107,14 +114,18 @@ script:
|
||||
{{ states('input_number.wakeup_lights_fade_day') }}
|
||||
{% endif %}
|
||||
- choose:
|
||||
- conditions: "{{ wait.trigger == 'none' or wait.trigger.idx is undefined }}"
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ wait.trigger == 'none' or wait.trigger.idx is undefined }}"
|
||||
sequence:
|
||||
- service: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.master_bedroom_scenes
|
||||
data:
|
||||
option: Adaptive
|
||||
- conditions: "{{ wait.trigger.id == 'lights-off' }}"
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: "{{ wait.trigger.id == 'lights-off' }}"
|
||||
sequence:
|
||||
- service: switch.turn_on
|
||||
target:
|
||||
@ -140,6 +151,13 @@ script:
|
||||
timeout:
|
||||
minutes: 60
|
||||
continue_on_timeout: true
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{{ is_state('input_boolean.give_me_darkness','on') and is_state('input_boolean.goodnight','off') }}"
|
||||
then:
|
||||
- service: script.turn_on
|
||||
target:
|
||||
entity_id: script.goodnight_on_second_floor
|
||||
- service: switch.turn_on
|
||||
target:
|
||||
entity_id: switch.adaptive_lighting_master_bedroom
|
||||
@ -151,10 +169,6 @@ script:
|
||||
entity_id: input_text.master_bedroom_selected_scene
|
||||
data:
|
||||
value: Adaptive
|
||||
- service: adaptive_lighting.set_manual_control
|
||||
data:
|
||||
manual_control: false
|
||||
entity_id: switch.adaptive_lighting_master_bedroom
|
||||
|
||||
# TODO: Figure out which actions to move here, and which ones to keep in Node-RED
|
||||
|
||||
|
Reference in New Issue
Block a user