Additional improvements to Give Me Darkness
This commit is contained in:
96
scripts.yaml
96
scripts.yaml
@ -25,41 +25,13 @@ give_me_darkness:
|
|||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.give_me_darkness
|
entity_id: input_boolean.give_me_darkness
|
||||||
|
alias: Turn on input boolean
|
||||||
- service: light.turn_on
|
- service: light.turn_on
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
area_id:
|
area_id:
|
||||||
- dining_room
|
- dining_room
|
||||||
- choose:
|
alias: Turn on Dining Room Lamp
|
||||||
- conditions:
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_boolean.guest_mode
|
|
||||||
state: 'off'
|
|
||||||
sequence:
|
|
||||||
- service: light.turn_off
|
|
||||||
target:
|
|
||||||
area_id:
|
|
||||||
- kallen_bedroom
|
|
||||||
- master_bedroom
|
|
||||||
- living_room
|
|
||||||
- emma_bedroom
|
|
||||||
- downstairs_bathroom
|
|
||||||
data: {}
|
|
||||||
- conditions:
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_boolean.guest_mode
|
|
||||||
state: 'on'
|
|
||||||
sequence:
|
|
||||||
- service: light.turn_off
|
|
||||||
target:
|
|
||||||
area_id:
|
|
||||||
- kallen_bedroom
|
|
||||||
- master_bedroom
|
|
||||||
- emma_bedroom
|
|
||||||
- downstairs_bathroom
|
|
||||||
data: {}
|
|
||||||
alias: Leave living room light on
|
|
||||||
alias: Turn off lights, leave living room light on if guest mode is on
|
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
@ -74,29 +46,67 @@ give_me_darkness:
|
|||||||
entity_id:
|
entity_id:
|
||||||
- switch.adaptive_lighting_sleep_mode_dining_room
|
- switch.adaptive_lighting_sleep_mode_dining_room
|
||||||
data: {}
|
data: {}
|
||||||
|
alias: Turn on night mode for Dining Room Lamp
|
||||||
- if:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: person.christina_stork
|
entity_id: person.christina_stork
|
||||||
state: home
|
state: home
|
||||||
|
alias: Check if Christina is home
|
||||||
then:
|
then:
|
||||||
- service: input_select.select_option
|
- service: input_select.select_option
|
||||||
data:
|
data:
|
||||||
option: Night Mode
|
option: Night Mode
|
||||||
target:
|
target:
|
||||||
entity_id: input_select.tina_desk_scenes
|
entity_id: input_select.tina_desk_scenes
|
||||||
- if:
|
alias: Set Tina desk lights to Night Mode
|
||||||
- condition: template
|
alias: If Christina is home, set her desk lights to night mode
|
||||||
value_template: "{% if is_state('person.tony_stork','home') and is_state('person.christina_stork','home')
|
- choose:
|
||||||
%}\n true\n{% else %}\n false\n{% endif %}"
|
- conditions:
|
||||||
alias: Both adults are home
|
- condition: state
|
||||||
then:
|
entity_id: input_boolean.guest_mode
|
||||||
- service: script.activate_alexa_actionable_notification
|
state: 'off'
|
||||||
data_template:
|
alias: If Guest Mode is off
|
||||||
text: Would you like me to arm the security system?
|
sequence:
|
||||||
event_id: actionable_notification_night_security_arm
|
- service: light.turn_off
|
||||||
alexa_device: '{{ states(''sensor.last_alexa'') }}'
|
target:
|
||||||
alias: Ask to arm security
|
area_id:
|
||||||
alias: Ask to arm security if both adults are home
|
- kallen_bedroom
|
||||||
|
- master_bedroom
|
||||||
|
- living_room
|
||||||
|
- emma_bedroom
|
||||||
|
- downstairs_bathroom
|
||||||
|
data: {}
|
||||||
|
alias: Turn off the usual lights
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{% if is_state('person.tony_stork','home') and is_state('person.christina_stork','home')
|
||||||
|
%}\n true\n{% else %}\n false\n{% endif %}"
|
||||||
|
alias: Both adults are home
|
||||||
|
then:
|
||||||
|
- service: script.activate_alexa_actionable_notification
|
||||||
|
data_template:
|
||||||
|
text: Would you like me to arm the security system?
|
||||||
|
event_id: actionable_notification_night_security_arm
|
||||||
|
alexa_device: '{{ states(''sensor.last_alexa'') }}'
|
||||||
|
alias: Ask to arm security
|
||||||
|
alias: Ask to arm security if both adults are home
|
||||||
|
- conditions:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.guest_mode
|
||||||
|
state: 'on'
|
||||||
|
alias: If Guest Mode is on
|
||||||
|
sequence:
|
||||||
|
- service: light.turn_off
|
||||||
|
target:
|
||||||
|
area_id:
|
||||||
|
- kallen_bedroom
|
||||||
|
- master_bedroom
|
||||||
|
- emma_bedroom
|
||||||
|
- downstairs_bathroom
|
||||||
|
data: {}
|
||||||
|
alias: Same as other option, but leave living room light on
|
||||||
|
alias: Turn off lights, leave living room light on if guest mode is on, arm security
|
||||||
|
if not
|
||||||
mode: single
|
mode: single
|
||||||
icon: mdi:weather-night
|
icon: mdi:weather-night
|
||||||
start_youtube:
|
start_youtube:
|
||||||
|
Reference in New Issue
Block a user