Migrate lighting automations and scripts #154

This commit is contained in:
2023-10-02 19:11:09 -04:00
parent 1a1dcfd81a
commit 46b20a42cf
3 changed files with 1559 additions and 1467 deletions

View File

@ -1573,3 +1573,612 @@
entity_id: alarm_control_panel.alexa_guard_9ee3b
data: {}
mode: restart
- id: '1696286103061'
alias: Living Room Night Lighting
description: Provide lighting in case anyone needs to go downstairs in the middle
of the night.
trigger:
- platform: state
entity_id: binary_sensor.living_room_motion
from: 'off'
to: 'on'
id: motion-on
- platform: state
entity_id: binary_sensor.living_room_motion
from: 'on'
to: 'off'
id: motion-off
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.living_room_motion_timer
id: timer-finished
condition:
- condition: state
entity_id: binary_sensor.people_present
state: 'on'
- condition: state
entity_id: input_boolean.vacation_mode
state: 'off'
action:
- choose:
- conditions:
- condition: template
value_template: '{{ (trigger.id == ''motion-on'' and is_state(''input_boolean.night_mode'',''on''))
and (is_state(''input_boolean.kallen_sleeping'',''on'') or is_state(''input_boolean.kallen_overnight'',''on''))
}}'
alias: Motion On
sequence:
- service: timer.cancel
target:
entity_id: timer.living_room_motion_timer
data: {}
- service: light.turn_on
target:
entity_id: light.first_floor_lights
data: {}
- service: script.stairwell_led_strip
data:
color_temp_kelvin: 2000
brightness: 255
- service: input_select.select_option
target:
entity_id:
- input_select.living_room_scenes
- input_select.tina_lamp_scenes
- input_select.mud_room_scenes
- input_select.downstairs_bathroom_scenes
- input_select.dining_room_lamp_scenes
data:
option: Adaptive
- conditions:
- condition: template
value_template: '{{ (trigger.id == ''motion-off'' and is_state(''input_boolean.night_mode'',''on''))
and (is_state(''input_boolean.kallen_sleeping'',''on'') or is_state(''input_boolean.kallen_overnight'',''on''))
}}'
alias: Motion Off
sequence:
- service: timer.start
target:
entity_id: timer.living_room_motion_timer
data:
duration: '{% from ''time.jinja'' import timer_duration %} {{ timer_duration(''input_number.living_room_lights_off_delay'')
}}
'
- conditions:
- condition: trigger
id: timer-finished
alias: Timer Finished
sequence:
- service: light.turn_off
target:
entity_id:
- light.living_room_lights
- light.tina_desk_lights
- light.mud_room_overhead
- light.downstairs_bathroom_lights
- light.dining_room_lamp
data: {}
- service: script.stairwell_led_strip
data:
color_temp_kelvin: 2000
brightness: '{{ 50 if is_state(''binary_sensor.early_night_mode'',''on'')
else 255 }}'
- delay:
seconds: 5
- if:
- condition: state
entity_id: binary_sensor.early_night_mode
state: 'off'
then:
- service: light.turn_off
target:
entity_id: light.stairwell_led_strip
data: {}
mode: restart
- id: '1696286192013'
alias: Tina Desk Lights Handler
description: Handles turning on the desk lights with smart scene selection and also
turning them off
trigger:
- platform: state
entity_id: input_boolean.tina_desk_lights
from: 'off'
to: 'on'
id: toggle-on
- platform: state
entity_id: input_boolean.tina_desk_lights
from: 'on'
to: 'off'
id: toggle-off
- platform: state
entity_id: input_select.tina_desk_scenes
to: Reset
id: reset
- platform: state
entity_id: light.tina_desk_lights
from: 'on'
to: 'off'
id: lights-off
- platform: state
entity_id: light.tina_desk_lights
from: 'off'
to: 'on'
id: lights-on
- platform: state
entity_id: binary_sensor.tina_desktop_on
from: 'off'
to: 'on'
id: computer-on
condition: []
action:
- if:
- condition: or
conditions:
- condition: trigger
id: toggle-on
- condition: trigger
id: reset
- condition: trigger
id: computer-on
then:
- service: input_select.select_option
target:
entity_id: input_select.tina_desk_scenes
data:
option: '{{ states(''sensor.tina_desk_scene'') }}'
- if:
- condition: trigger
id: toggle-off
then:
- service: light.turn_off
target:
entity_id: light.tina_desk_lights
data: {}
- if:
- condition: trigger
id: lights-off
then:
- if:
- condition: state
entity_id: input_boolean.tina_desk_lights
state: 'on'
then:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.tina_desk_lights
data: {}
- if:
- condition: trigger
id: lights-on
then:
- if:
- condition: state
entity_id: input_boolean.tina_desk_lights
state: 'off'
then:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.tina_desk_lights
data: {}
- delay:
seconds: 2
alias: Prevent script from re-triggering when boolean is turned on
mode: single
- id: '1696286403914'
alias: Basement Lights Handling
description: Handles the presence-related automation of lights in the basement
trigger:
- platform: state
entity_id: binary_sensor.basement_studio_door
from: 'off'
to: 'on'
id: door-open
- platform: state
entity_id: binary_sensor.basement_studio_door
from: 'on'
to: 'off'
id: door-closed
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.basement_studio_door_timer
id: timer-finished
- platform: state
entity_id: binary_sensor.basement_occupied
from: 'off'
to: 'on'
id: basement-occupied
- platform: state
entity_id: binary_sensor.basement_occupied
from: 'on'
to: 'off'
id: basement-unoccupied
- platform: state
entity_id:
- input_boolean.studio_quiet
- input_boolean.recliner_mode
from: 'off'
to: 'on'
id: studio-quiet
- platform: state
entity_id: sensor.twitch_ironnerd24
from: offline
to: streaming
id: stream-started
condition:
- condition: state
entity_id: input_boolean.studio_quiet
state: 'off'
action:
- choose:
- conditions:
- condition: trigger
id: door-open
sequence:
- if:
- condition: state
entity_id: light.basement_studio_lights
state: 'off'
then:
- service: light.turn_on
target:
entity_id: light.basement_studio_lights
data: {}
- service: timer.cancel
target:
entity_id: timer.basement_studio_door_timer
data: {}
- conditions:
- condition: trigger
id: door-closed
sequence:
- if:
- condition: state
entity_id: binary_sensor.basement_occupied
state: 'off'
then:
- service: timer.start
target:
entity_id: timer.basement_studio_door_timer
data:
duration: '{% from ''time.jinja'' import timer_duration %} {{ timer_duration(''input_number.basement_studio_lights_off_delay'')
}}
'
- conditions:
- condition: trigger
id:
- basement-occupied
- studio-quiet
- stream-started
sequence:
- service: timer.cancel
target:
entity_id: timer.basement_studio_door_timer
data: {}
- conditions:
- condition: trigger
id: basement-unoccupied
sequence:
- if:
- condition: state
entity_id: light.basement_studio_lights
state: 'on'
then:
- if:
- condition: state
entity_id: timer.basement_studio_door_timer
state: idle
then:
- service: timer.start
target:
entity_id: timer.basement_studio_door_timer
data:
duration: '{% from ''time.jinja'' import timer_duration %} {{ timer_duration(''input_number.basement_studio_lights_off_delay'')
}}
'
- conditions:
- condition: trigger
id: timer-finished
sequence:
- service: light.turn_off
target:
entity_id: light.basement_studio_lights
data: {}
mode: restart
- id: '1696286481890'
alias: Recliner Mode
description: For naptime in the basement
trigger:
- platform: state
entity_id: input_boolean.recliner_mode
from: 'off'
to: 'on'
id: recliner-on
- platform: state
entity_id: input_boolean.recliner_mode
from: 'on'
to: 'off'
id: recliner-off
condition: []
action:
- choose:
- conditions:
- condition: trigger
id: recliner-on
sequence:
- service: input_select.select_option
target:
entity_id: input_select.basement_studio_scenes
data:
option: Stairwell
- service: input_boolean.turn_on
target:
entity_id:
- input_boolean.white_noise_basement
- input_boolean.studio_quiet
data: {}
- service: script.turn_on
target:
entity_id: script.asus_laptop_displays_off
data: {}
- if:
- condition: template
value_template: "{% if is_state('media_player.basement_tv','playing') %}\n
\ false\n{% elif is_state('media_player.basement_tv','paused') or is_state('media_player.basement_tv','idle')
%}\n {{ state_attr('media_player.basement_tv','app_name') in ['TV','Android
TV Launcher'] }}\n{% else %}\n false\n{% endif %}\n"
then:
- service: media_player.turn_off
target:
entity_id: media_player.basement_tv
data: {}
- if:
- condition: not
conditions:
- condition: state
entity_id: media_player.tony_asus
state: playing
then:
- service: script.turn_on
target:
entity_id: script.tony_desktop_displays_off
data: {}
- conditions:
- condition: trigger
id: recliner-off
sequence:
- service: input_select.select_option
target:
entity_id: input_select.basement_studio_scenes
data:
option: Adaptive
- service: input_boolean.turn_off
target:
entity_id:
- input_boolean.white_noise_basement
- input_boolean.studio_quiet
data: {}
- service: script.turn_on
target:
entity_id:
- script.tony_desktop_displays_on
- script.asus_laptop_displays_on
data: {}
- service: media_player.turn_on
target:
entity_id: media_player.basement_tv
data: {}
mode: restart
- id: '1696286540644'
alias: Basement Lights Adaptive Resync
description: Deals with situations where the basement lights should be adaptive
but end up out of sync
trigger:
- platform: state
entity_id: binary_sensor.basement_lights_sync_issue
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: input_boolean.studio_quiet
state: 'off'
- condition: template
value_template: '{{ is_state_attr(''light.basement_studio_lights'',''color_mode'',''color_temp'')
}}'
action:
- service: adaptive_lighting.apply
data:
entity_id: switch.adaptive_lighting_basement_studio
adapt_brightness: '{{ is_state(''switch.adaptive_lighting_adapt_brightness_basement_studio'',''on'')
}}'
adapt_color: '{{ is_state(''switch.adaptive_lighting_adapt_color_basement_studio'',''on'')
}}'
mode: restart
- id: '1696286644401'
alias: Basement LED Strip Reset
description: Power cycle the LED strip when it goes unavailable
trigger:
- platform: state
entity_id: light.basement_led_strip_1
to: unavailable
for:
minutes: 5
id: offline
- platform: state
entity_id: input_button.basement_led_strip_reset
not_to:
- unavailable
- unknown
id: button
- platform: time
at: 00:00:00
id: midnight
condition: []
action:
- choose:
- conditions:
- condition: and
conditions:
- condition: trigger
id:
- offline
- button
sequence:
- if:
- condition: template
value_template: '{{ is_state(''input_boolean.studio_quiet'',''off'') and
is_state(''sensor.twitch_ironnerd24'',''offline'') and states(''switch.basement_led_strip'')
not in [''unknown'',''unavailable''] }}'
then:
- repeat:
while:
- condition: state
entity_id: light.basement_led_strip_1
state: unavailable
- condition: template
value_template: '{{ repeat.index <= 10 }}'
sequence:
- service: input_number.increment
target:
entity_id: input_number.basement_led_strip_resets
data: {}
- service: switch.turn_off
target:
entity_id: switch.basement_led_strip
data: {}
- delay:
seconds: 20
- service: switch.turn_on
target:
entity_id: switch.basement_led_strip
data: {}
- delay:
seconds: 30
- conditions:
- condition: trigger
id: midnight
sequence:
- service: input_number.set_value
target:
entity_id: input_number.basement_led_strip_resets
data:
value: 0
mode: single
- id: '1696286732266'
alias: Living Room Lights Adaptive Resync
description: Deals with situations where the living room lights should be adaptive
but end up out of sync
trigger:
- platform: state
entity_id: binary_sensor.living_room_sync_issue
from: 'off'
to: 'on'
condition:
- condition: template
value_template: '{{ is_state_attr(''light.living_room_lights'',''color_mode'',''color_temp'')
}}'
action:
- service: adaptive_lighting.apply
data:
entity_id: switch.adaptive_lighting_living_room
adapt_brightness: '{{ is_state(''switch.adaptive_lighting_adapt_brightness_living_room'',''on'')
}}'
adapt_color: '{{ is_state(''switch.adaptive_lighting_adapt_color_living_room'',''on'')
}}'
mode: restart
- id: '1696286814384'
alias: Vacation Lighting
description: Turns on lights for helpers who come over (such as to take care of
the cats) while we are gone
trigger:
- platform: state
entity_id: binary_sensor.front_door
to: 'on'
id: door
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.vacation_helper
id: timer-finished
condition:
- condition: state
entity_id: input_boolean.vacation_mode
state: 'on'
action:
- choose:
- conditions:
- condition: trigger
id: door
sequence:
- service: input_boolean.turn_on
target:
entity_id: input_boolean.audible_notifications
data: {}
- service: light.turn_on
target:
entity_id:
- light.basement_studio_lights
- light.first_floor_lights
- light.second_floor_lights
data: {}
- service: switch.turn_off
target:
entity_id: switch.presence_simulation
data: {}
- delay:
seconds: 3
- service: input_select.select_option
target:
entity_id:
- input_select.basement_studio_scenes
- input_select.living_room_scenes
- input_select.downstairs_bathroom_scenes
- input_select.dining_room_lamp_scenes
- input_select.mud_room_scenes
- input_select.upstairs_hallway_scenes
- input_select.upstairs_bathroom_scenes
- input_select.master_bedroom_scenes
- input_select.kallen_bedroom_scenes
- input_select.emma_bedroom_scenes
data:
option: Adaptive
- service: input_select.select_option
target:
entity_id: input_select.tina_desk_scenes
data:
option: Evening Mode
- service: timer.start
target:
entity_id: timer.vacation_helper
data:
duration: 01:00:00
- service: script.speech_engine
data:
who: living_room
message: Welcome, vacation helper. I have turned on every light in the house
for you. They will remain on for one hour. Thank you for your help.
type: alert
- conditions:
- condition: trigger
id: timer-finished
sequence:
- service: light.turn_off
target:
entity_id:
- light.basement_studio_lights
- light.first_floor_lights
- light.second_floor_lights
data: {}
- service: switch.turn_on
target:
entity_id: switch.presence_simulation
data: {}
- service: input_boolean.turn_off
target:
entity_id: input_boolean.audible_notifications
data: {}
mode: restart

File diff suppressed because it is too large Load Diff

View File

@ -828,3 +828,953 @@ basement_shutdown:
alias: Cancel the door timer since the lights are already off
mode: restart
icon: mdi:power
'1696286918470':
alias: Stairwell LED Strip
sequence:
- variables:
brt1: 50
brt2: 100
brt3: 150
brtmax: 255
colortemp: "{% if is_state('input_boolean.goodnight','off') and\n is_state('input_boolean.give_me_darkness','off')
and\n is_state('binary_sensor.early_night_mode','off')\n%}\n 4000\n{%
else %}\n 2000\n{% endif %}\n"
- if:
- condition: template
value_template: '{{ brightness == ''reset'' }}'
then:
- service: light.turn_on
target:
entity_id: light.stairwell_led_strip
data:
brightness: "{% if is_state('input_boolean.goodnight','on') %}\n {{ brt1
}}\n{% elif is_state('input_boolean.give_me_darkness','on') %}\n {{ brt2
}}\n{% elif is_state('binary_sensor.early_night_mode','on') %}\n {{ brt3
}}\n{% else %}\n {{ brtmax }}\n{% endif %}\n"
color_temp_kelvin: '{{ colortemp }}'
else:
- service: light.turn_on
target:
entity_id: light.stairwell_led_strip
data:
brightness: '{{ brightness|default(brt3) }}'
color_temp_kelvin: '{{ color_temp_kelvin|default(colortemp) }}'
description: This script handles a few settings for the stairwell LED strip, for
convenience
mode: restart
adaptive_on_first_floor_2:
alias: Adaptive on First Floor
sequence:
- if:
- condition: state
entity_id: light.living_room_lights
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.living_room_scenes
data:
option: Adaptive
alias: Set adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_living_room
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_living_room
data: {}
- service: input_text.set_value
target:
entity_id: input_text.living_room_selected_scene
data:
value: Adaptive
alias: If living room lights are on
- if:
- condition: state
entity_id: light.dining_room_lamp
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.dining_room_lamp_scenes
data:
option: Adaptive
alias: Set adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_dining_room_lamp
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_dining_room_lamp
data: {}
- service: input_text.set_value
target:
entity_id: input_text.dining_room_lamp_selected_scene
data:
value: Adaptive
alias: If dining room lamp is on
- if:
- condition: or
conditions:
- condition: state
entity_id: light.tina_lamp
state: 'on'
- condition: state
entity_id: light.tina_desk_strip
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.tina_desk_scenes
data:
option: Reset
alias: Set Adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_tina_lamp
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_tina_lamp
data: {}
alias: If Tina's desk lights are on
- if:
- condition: state
entity_id: light.downstairs_bathroom_lights
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.downstairs_bathroom_scenes
data:
option: Adaptive
alias: Set adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_downstairs_bathroom
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_downstairs_bathroom
data: {}
- service: input_text.set_value
target:
entity_id: input_text.downstairs_bathroom_selected_scene
data:
value: Adaptive
alias: If downstairs bathroom lights are on
- if:
- condition: state
entity_id: light.mud_room_overhead
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.mud_room_scenes
data:
option: Adaptive
alias: Set adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_mud_room
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_mud_room
data: {}
- service: input_text.set_value
target:
entity_id: input_text.mud_room_selected_scene
data:
value: Adaptive
alias: If mud room light is on
mode: single
'1696287200179':
alias: Adaptive on Second Floor
sequence:
- if:
- condition: state
entity_id: binary_sensor.early_night_mode
state: 'on'
then:
- service: script.stairwell_led_strip
data:
brightness: reset
alias: If early night mode is on
- if:
- condition: state
entity_id: light.hallway_overhead
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.upstairs_hallway_scenes
data:
option: Adaptive
alias: Set adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_upstairs_hallway
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_upstairs_hallway
data: {}
- service: input_text.set_value
target:
entity_id: input_text.upstairs_hallway_selected_scene
data:
value: Adaptive
alias: If hallway light is on
- if:
- condition: state
entity_id: light.master_bedroom_lights
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.master_bedroom_scenes
data:
option: Adaptive
alias: Set adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_master_bedroom
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_master_bedroom
data: {}
- service: input_text.set_value
target:
entity_id: input_text.master_bedroom_selected_scene
data:
value: Adaptive
alias: If master bedroom lights are on
- if:
- condition: state
entity_id: light.kallen_bedroom_lights
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.kallen_bedroom_scenes
data:
option: Adaptive
alias: Set adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_kallen_bedroom
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_kallen_bedroom
data: {}
- service: input_text.set_value
target:
entity_id: input_text.kallen_bedroom_selected_scene
data:
value: Adaptive
alias: If Kallen's bedroom lights are on
- if:
- condition: state
entity_id: light.emma_bedroom_light
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.emma_bedroom_scenes
data:
option: Adaptive
alias: Set adaptive
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_emma_bedroom
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_emma_bedroom
data: {}
- service: input_text.set_value
target:
entity_id: input_text.emma_bedroom_selected_scene
data:
value: Adaptive
alias: If Emma's bedroom light is on
- if:
- condition: state
entity_id: input_boolean.shower_mode
state: 'off'
then:
- if:
- condition: state
entity_id: binary_sensor.upstairs_bathroom_occupied
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.upstairs_bathroom_scenes
data:
option: Adaptive
else:
- if:
- condition: state
entity_id: binary_sensor.early_night_mode
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.upstairs_bathroom_scenes
data:
option: Nightlight
else:
- service: light.turn_off
target:
entity_id: light.upstairs_bathroom_lights
data: {}
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_upstairs_bathroom
data: {}
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_upstairs_bathroom
data: {}
- service: input_text.set_value
target:
entity_id: input_text.upstairs_bathroom_selected_scene
data:
value: Adaptive
alias: Upstairs bathroom handling
'1696287373796':
alias: Bright on First Floor
sequence:
- service: light.turn_on
target:
entity_id:
- light.living_room_lights
- light.downstairs_bathroom_lights
- light.dining_room_lamp
- light.mud_room_overhead
data: {}
- service: input_boolean.turn_on
target:
entity_id: input_boolean.tina_desk_lights
data: {}
- delay:
seconds: 1
- service: input_select.select_option
target:
entity_id:
- input_select.living_room_scenes
- input_select.downstairs_bathroom_scenes
- input_select.mud_room_scenes
- input_select.dining_room_lamp_scenes
data:
option: Bright
- service: light.turn_on
target:
entity_id:
- light.tina_desk_strip
- light.tina_lamp
data:
color_temp_kelvin: 2700
- service: light.turn_on
target:
entity_id:
- light.tina_lamp
- light.tina_desk_strip
data:
brightness: 255
'1696287429248':
alias: Bright on Second Floor
sequence:
- service: script.stairwell_led_strip
data:
brightness: 255
- service: light.turn_on
target:
entity_id:
- light.hallway_overhead
- light.master_bedroom_lights
data: {}
- if:
- condition: state
entity_id: input_boolean.shower_mode
state: 'off'
then:
- service: input_select.select_option
target:
entity_id: input_select.upstairs_bathroom_scenes
data:
option: Bright
- if:
- condition: state
entity_id: input_boolean.kallen_sleeping
state: 'off'
then:
- service: light.turn_on
target:
entity_id: light.kallen_bedroom_lights
data: {}
- if:
- condition: state
entity_id: input_boolean.emma_sleeping
state: 'off'
then:
- service: light.turn_on
target:
entity_id: light.emma_bedroom_light
data: {}
- delay:
seconds: 1
- service: input_select.select_option
target:
entity_id:
- input_select.upstairs_hallway_scenes
- input_select.master_bedroom_scenes
data:
option: Bright
- if:
- condition: state
entity_id: input_boolean.shower_mode
state: 'off'
then:
- service: input_select.select_option
target:
entity_id: input_select.upstairs_bathroom_scenes
data:
option: Bright
- if:
- condition: template
value_template: '{{ is_state(''input_boolean.kallen_sleeping'',''off'') or (is_state(''input_boolean.kallen_sleeping'',''on'')
and is_state(''light.kallen_bedroom_lights'',''on'')) }}'
then:
- service: input_select.select_option
target:
entity_id: input_select.kallen_bedroom_scenes
data:
option: Bright
- if:
- condition: template
value_template: '{{ is_state(''input_boolean.emma_sleeping'',''off'') or (is_state(''input_boolean.emma_sleeping'',''on'')
and is_state(''light.emma_bedroom_light'',''on'')) }}'
then:
- service: input_select.select_option
target:
entity_id: input_select.emma_bedroom_scenes
data:
option: Bright
'1696287564414':
alias: Evening on First Floor
sequence:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.early_night_mode
state: 'off'
sequence:
- stop: This scene does nothing during daytime
- conditions:
- condition: state
entity_id: input_boolean.give_me_darkness
state: 'on'
sequence:
- if:
- condition: state
entity_id: person.christina_stork
state: home
then:
- service: input_select.select_option
target:
entity_id: input_select.tina_desk_scenes
data:
option: Night Mode
- choose:
- conditions:
- condition: state
entity_id: input_boolean.guest_mode
state: 'off'
sequence:
- if:
- condition: template
value_template: '{{ give_me_darkness == 1 }}'
then:
- if:
- condition: state
entity_id: timer.downstairs_bathroom_lights_timer
state: idle
then:
- service: light.turn_off
target:
entity_id:
- light.downstairs_bathroom_lights
data: {}
- service: input_select.select_option
target:
entity_id:
- input_select.mud_room_scenes
data:
option: Nightlight
else:
- service: light.turn_off
target:
entity_id:
- light.living_room_lights
data: {}
- if:
- condition: state
entity_id: timer.downstairs_bathroom_lights_timer
state: idle
then:
- service: light.turn_off
target:
entity_id:
- light.downstairs_bathroom_lights
data: {}
- service: input_select.select_option
target:
entity_id:
- input_select.mud_room_scenes
- input_select.dining_room_lamp_scenes
data:
option: Nightlight
- conditions:
- condition: state
entity_id: input_boolean.guest_mode
state: 'on'
sequence:
- if:
- condition: state
entity_id: timer.downstairs_bathroom_lights_timer
state: idle
then:
- service: light.turn_off
target:
entity_id:
- light.downstairs_bathroom_lights
data: {}
- conditions:
- condition: state
entity_id: input_boolean.give_me_darkness
state: 'off'
sequence:
- if:
- condition: template
value_template: '{{ sunset_lights == 1 }}'
then:
- service: light.turn_on
target:
entity_id:
- light.living_room_lights
- light.mud_room_overhead
data: {}
- 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
target:
entity_id:
- light.dining_room_lamp
data: {}
- if:
- condition: state
entity_id: timer.downstairs_bathroom_lights_timer
state: idle
then:
- service: light.turn_off
target:
entity_id: light.downstairs_bathroom_lights
data: {}
- service: input_boolean.turn_off
target:
entity_id: input_boolean.tina_desk_lights
data: {}
- service: light.turn_on
target:
entity_id:
- light.living_room_lights
- light.mud_room_overhead
data: {}
- service: input_select.select_option
target:
entity_id:
- input_select.living_room_scenes
- input_select.mud_room_scenes
data:
option: Adaptive
'1696287633054':
alias: Evening on Second Floor
sequence:
- condition: state
entity_id: binary_sensor.early_night_mode
state: 'on'
- choose:
- conditions:
- condition: state
entity_id: input_boolean.give_me_darkness
state: 'on'
sequence:
- service: script.stairwell_led_strip
data:
color_temp_kelvin: 2000
brightness: 100
- service: input_select.select_option
target:
entity_id:
- input_select.upstairs_hallway_scenes
data:
option: Nightlight
- if:
- condition: state
entity_id: input_boolean.shower_mode
state: 'off'
then:
- service: input_select.select_option
target:
entity_id: input_select.upstairs_bathroom_scenes
data:
option: "{% if is_state('binary_sensor.upstairs_bathroom_occupied','on')
%}\n Adaptive\n{% else %}\n Nightlight\n{% endif %}\n"
- service: light.turn_off
target:
area_id:
- kallen_bedroom
- master_bedroom
- emma_bedroom
data: {}
- delay:
seconds: 1
- service: switch.turn_on
target:
entity_id:
- switch.adaptive_lighting_kallen_bedroom
- switch.adaptive_lighting_master_bedroom
- switch.adaptive_lighting_emma_bedroom
data: {}
- service: switch.turn_off
target:
entity_id:
- switch.adaptive_lighting_sleep_mode_kallen_bedroom
- switch.adaptive_lighting_sleep_mode_master_bedroom
- switch.adaptive_lighting_sleep_mode_emma_bedroom
data: {}
- 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
- conditions:
- condition: state
entity_id: input_boolean.give_me_darkness
state: 'off'
sequence:
- service: script.stairwell_led_strip
data:
color_temp_kelvin: 2000
brightness: 150
- service: input_select.select_option
target:
entity_id: input_select.upstairs_hallway_scenes
data:
option: Nightlight
- if:
- condition: state
entity_id: input_boolean.shower_mode
state: 'off'
then:
- service: input_select.select_option
target:
entity_id: input_select.upstairs_bathroom_scenes
data:
option: "{% if is_state('binary_sensor.upstairs_bathroom_occupied','on')
%}\n Adaptive\n{% else %}\n Nightlight\n{% endif %}\n"
- if:
- condition: template
value_template: '{{ sunset_lights == 1 }}'
then:
- stop: Sunset lights don't mess with bedroom light states before bedtime
else:
- service: light.turn_off
target:
area_id:
- master_bedroom
- kallen_bedroom
- emma_bedroom
data: {}
- delay:
seconds: 1
- service: switch.turn_on
target:
entity_id:
- switch.adaptive_lighting_kallen_bedroom
- switch.adaptive_lighting_master_bedroom
- switch.adaptive_lighting_emma_bedroom
data: {}
- service: switch.turn_off
target:
entity_id:
- switch.adaptive_lighting_sleep_mode_kallen_bedroom
- switch.adaptive_lighting_sleep_mode_master_bedroom
- switch.adaptive_lighting_sleep_mode_emma_bedroom
data: {}
- 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
'1696287683022':
alias: Goodnight in Basement
sequence:
- service: light.turn_off
target:
area_id:
- basement_studio
- furnace_room
data: {}
- service: fan.turn_off
target:
entity_id: fan.basement_fan
data: {}
'1696287713844':
alias: Goodnight on First Floor
sequence:
- if:
- condition: state
entity_id: input_boolean.guest_mode
state: 'on'
then:
- service: light.turn_off
target:
area_id:
- dining_room
- downstairs_bathroom
- living_room
- tina_desk
data: {}
- service: input_select.select_option
target:
entity_id: input_select.mud_room_scenes
data:
option: Nightlight
else:
- service: light.turn_off
target:
area_id:
- dining_room
- downstairs_bathroom
- living_room
- mud_room
- tina_desk
data: {}
'1696287748896':
alias: Goodnight on Second Floor
sequence:
- service: light.turn_off
target:
area_id:
- emma_bedroom
- kallen_bedroom
- master_bedroom
- master_bedroom_closet
data: {}
- if:
- condition: state
entity_id: input_boolean.guest_mode
state: 'on'
then:
- service: input_select.select_option
target:
entity_id: input_select.upstairs_hallway_scenes
data:
option: Nightlight
else:
- service: light.turn_off
target:
entity_id: light.hallway_overhead
data: {}
- if:
- condition: state
entity_id: input_boolean.kallen_overnight
state: 'on'
then:
- service: light.turn_off
target:
area_id: upstairs_bathroom
data: {}
else:
- service: input_select.select_option
target:
entity_id: input_select.upstairs_bathroom_scenes
data:
option: Single Nightlight
- service: script.stairwell_led_strip
data:
color_temp_kelvin: 2000
brightness: 50
'1696287826909':
alias: Morning Scene
sequence:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.master_bedroom_sleeping
data: {}
- if:
- condition: template
value_template: '{% set weather = states(''weather.iron_nerd_weather_station'')
%} {{ weather in [''cloudy'',''partlycloudy'',''rainy'',''snowy'',''hail'',''lightning'',''lightning-rainy'',''pouring'',''snowy-rainy'']
}}
'
then:
- if:
- condition: template
value_template: '{{ is_state(''input_boolean.kallen_sleeping'',''off'') and
is_state(''person.kallen_stork'',''home'') }}'
then:
- service: light.turn_on
target:
entity_id: light.kallen_bedroom_lights
data: {}
- if:
- condition: state
entity_id: input_boolean.emma_sleeping
state: 'off'
then:
- service: light.turn_on
target:
entity_id: light.emma_bedroom_light
data: {}
'1696287949240':
alias: Day Mode in Tina Desk
sequence:
- parallel:
- service: light.turn_on
target:
entity_id: light.tina_lamp_top
data: {}
- service: light.turn_off
target:
entity_id: light.tina_lamp_side
data: {}
- service: light.turn_on
target:
entity_id: light.tina_desk_strip
data:
rgb_color:
- 0
- 255
- 255
brightness: 89
- wait_template: '{{ is_state(''light.tina_lamp_side'',''off'') }}'
timeout:
seconds: 15
continue_on_timeout: true
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_tina_lamp
data: {}
mode: restart
icon: mdi:palette
'1696288097687':
alias: Evening Mode in Tina Desk
sequence:
- parallel:
- service: light.turn_on
target:
entity_id: light.tina_lamp
data: {}
- service: light.turn_on
target:
entity_id: light.tina_desk_strip
data:
rgb_color:
- 127
- 0
- 255
brightness: 128
- service: input_select.select_option
target:
entity_id: input_select.tina_lamp_scenes
data:
option: Adaptive
mode: restart
icon: mdi:palette
'1696288151029':
alias: Night Mode in Tina Desk
sequence:
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_tina_lamp
data: {}
- parallel:
- service: light.turn_on
target:
entity_id: light.tina_lamp
data:
rgb_color:
- 127
- 0
- 255
brightness: 128
- service: light.turn_on
target:
entity_id: light.tina_desk_strip
data:
rgb_color:
- 127
- 0
- 255
brightness: 128
mode: restart
icon: mdi:palette
'1696288192634':
alias: Bright Mode in Tina Desk
sequence:
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_tina_lamp
data: {}
- parallel:
- service: light.turn_on
target:
entity_id: light.tina_lamp
data:
rgb_color:
- 255
- 210
- 175
brightness: 255
- service: light.turn_on
target:
entity_id: light.tina_desk_strip
data:
rgb_color:
- 255
- 210
- 175
brightness: 255
mode: restart
icon: mdi:palette