Files
Home-Assistant-Configs/packages/lighting_and_scenes.yaml

2293 lines
71 KiB
YAML

input_boolean:
shower_mode:
name: Shower Mode
icon: mdi:shower
living_room_entertainment_mode:
name: Living Room Entertainment Mode
icon: mdi:party-popper
basement_studio_entertainment_mode:
name: Basement Studio Entertainment Mode
icon: mdi:party-popper
front_porch_light_on:
name: Front Porch Light On
icon: hue:room-outdoors
living_room_dynamic_scenes:
name: Living Room Dynamic Scenes
icon: mdi:animation
basement_studio_dynamic_scenes:
name: Basement Studio Dynamic Scenes
icon: mdi:animation
living_room_entertainment_control:
name: Living Room Entertainment Control
icon: mdi:television-ambient-light
basement_studio_entertainment_control:
name: Basement Studio Entertainment Control
icon: mdi:television-ambient-light
delivery_mode:
name: Delivery Mode
icon: mdi:pizza
holiday_mode:
name: Holiday Mode
icon: mdi:string-lights
give_me_darkness:
name: Give Me Darkness
icon: mdi:weather-night
tina_desk_lights:
name: Tina Desk Lights
icon: mdi:desk
holiday_mode_hold:
name: Holiday Mode Hold
icon: mdi:party-popper
christmas_day_show:
name: Christmas Day Show
icon: mdi:pine-tree
recliner_mode:
name: Recliner Mode
icon: mdi:seat-recline-extra
input_number:
upstairs_bathroom_motion_off_delay:
name: Upstairs Bathroom Motion Off Delay
min: 0
max: 15
step: 1
unit_of_measurement: minutes
icon: mdi:timer
front_porch_motion_off_delay:
name: Front Porch Motion Off Delay
min: 0
max: 30
step: 1
unit_of_measurement: minutes
icon: mdi:timer
downstairs_bathroom_lights_off_delay:
name: Downstairs Bathroom Lights Off Delay
min: 0
max: 60
step: 1
unit_of_measurement: minutes
icon: mdi:timer
basement_studio_lights_off_delay:
name: Basement Studio Lights Off Delay
min: 0
max: 30
step: 1
unit_of_measurement: minutes
icon: mdi:timer
living_room_lights_off_delay:
name: Living Room Lights Off Delay
min: 0
max: 30
step: 1
unit_of_measurement: minutes
icon: mdi:timer
wakeup_lights_fade_day:
name: Wakeup Lights Fade Day
min: 0
max: 15
step: 1
unit_of_measurement: minutes
icon: mdi:timer
wakeup_lights_fade_night:
name: Wakeup Lights Fade Night
min: 0
max: 15
step: 1
unit_of_measurement: minutes
icon: mdi:timer
basement_led_strip_resets:
name: Basement LED Strip Resets
min: 0
max: 500
step: 1
unit_of_measurement: resets
icon: mdi:restore
input_select:
living_room_scenes:
name: Living Room Scenes
options:
- Select
- Adaptive
- Bright
- Dimmed
- Nightlight
- Energize
- Concentrate
- Savanna Sunset
- Tropical Twilight
- Tokyo
- Forest Adventure
- Painted Sky
- Twitch
- Netflix
- MLB
initial: Select
icon: hue:room-living
mud_room_scenes:
name: Mud Room Scenes
options:
- Select
- Adaptive
- Bright
- Dimmed
- Nightlight
initial: Select
icon: hue:room-other
dining_room_lamp_scenes:
name: Dining Room Lamp Scenes
options:
- Select
- Adaptive
- Bright
- Dimmed
- Nightlight
initial: Select
icon: mdi:floor-lamp-dual
upstairs_hallway_scenes:
name: Upstairs Hallway Scenes
options:
- Select
- Adaptive
- Bright
- Dimmed
- Nightlight
initial: Select
icon: hue:ceiling-round
kallen_bedroom_scenes:
name: Kallen Bedroom Scenes
options:
- Select
- Adaptive
- Bright
- Dimmed
- Nightlight
- Overhead Nightlight
- Wall Nightlight
initial: Select
icon: mdi:bunk-bed
emma_bedroom_scenes:
name: Emma Bedroom Scenes
options:
- Select
- Adaptive
- Bright
- Dimmed
- Nightlight
initial: Select
icon: hue:room-nursery
basement_studio_scenes:
name: Basement Studio Scenes
options:
- Select
- Adaptive
- Energize
- Concentrate
- Bright
- Dimmed
- Nightlight
- Relax
- Purple
- Pink
- Tokyo
- Twitch
- Netflix
- MLB
- Forest Adventure
- Kallen Reading
- Baby Is Napping
- Stairwell
initial: Select
icon: mdi:twitch
master_bedroom_scenes:
name: Master Bedroom Scenes
options:
- Select
- Adaptive
- Bright
- Dimmed
- Nightlight
- Front Nightlight
- Side Nightlight
initial: Select
icon: mdi:bed
upstairs_bathroom_scenes:
name: Upstairs Bathroom Scenes
options:
- Select
- Adaptive
- Bright
- Dimmed
- Nightlight
- Single Nightlight
initial: Select
icon: mdi:toilet
downstairs_bathroom_scenes:
name: Downstairs Bathroom Scenes
options:
- Select
- Adaptive
- Bright
- Dimmed
- Nightlight
initial: Select
icon: mdi:toilet
front_porch_scenes:
name: Front Porch Scenes
options:
- Select
- Adaptive
- Bright
- Energize
- Concentrate
- Dimmed
- Nightlight
- St Patricks Day
- Halloween
initial: Select
icon: hue:room-porch
tina_lamp_scenes:
name: Tina Lamp Scenes
options:
- Select
- Adaptive
- Energize
- Bright
- Nightlight
initial: Select
icon: hue:room-dining
tina_desk_scenes:
name: Tina Desk Scenes
options:
- Select
- Day Mode
- Evening Mode
- Night Mode
- Bright Mode
- Reset
initial: Select
icon: mdi:desk
holiday_animation:
name: Holiday Animation
options:
- Christmas
- Halloween
- St Patricks Day
icon: mdi:palette
input_text:
living_room_selected_scene:
name: Living Room Selected Scene
mud_room_selected_scene:
name: Mud Room Selected Scene
dining_room_lamp_selected_scene:
name: Dining Room Lamp Selected Scene
upstairs_hallway_selected_scene:
name: Upstairs Hallway Selected Scene
kallen_bedroom_selected_scene:
name: Kallen Bedroom Selected Scene
emma_bedroom_selected_scene:
name: Emma Bedroom Selected Scene
basement_studio_selected_scene:
name: Basement Studio Selected Scene
master_bedroom_selected_scene:
name: Master Bedroom Selected Scene
upstairs_bathroom_selected_scene:
name: Upstairs Bathroom Selected Scene
downstairs_bathroom_selected_scene:
name: Downstairs Bathroom Selected Scene
front_porch_selected_scene:
name: Front Porch Selected Scene
tina_lamp_selected_scene:
name: Tina Lamp Selected Scene
tina_desk_selected_scene:
name: Tina Desk Selected Scene
template:
- binary_sensor:
- name: Basement Lights Sync Issue
unique_id: 781d7a1e-ade3-44c3-b0f2-a15a5188107e
state: >
{% set colortemp = states('sensor.basement_studio_lights_colortemp_diff') | float(0) %}
{% set brightness = states('sensor.basement_studio_lights_brightness_diff') | float(0) %}
{% if is_state('light.basement_studio_lights','on') %}
{% if is_state('switch.adaptive_lighting_basement_studio','on') and is_state('switch.adaptive_lighting_sleep_mode_basement_studio','off') %}
{% if is_state('switch.adaptive_lighting_adapt_brightness_basement_studio','on') and is_state('switch.adaptive_lighting_adapt_color_basement_studio','on') %}
{{ (colortemp > 100 or colortemp < -100) or (brightness > 5 or brightness < -5) }}
{% elif is_state('switch.adaptive_lighting_adapt_brightness_basement_studio','on') and is_state('switch.adaptive_lighting_adapt_color_basement_studio','off') %}
{{ brightness > 5 or brightness < -5 }}
{% elif is_state('switch.adaptive_lighting_adapt_color_basement_studio','on') and is_state('switch.adaptive_lighting_adapt_brightness_basement_studio','off') %}
{{ colortemp > 100 or colortemp < -100 }}
{% endif %}
{% endif %}
{% endif %}
attributes:
color_diff: >
{% set colortemp = states('sensor.basement_studio_lights_colortemp_diff') | float(0) %}
{% if is_state('light.basement_studio_lights','on') %}
{% if is_state('switch.adaptive_lighting_basement_studio','on') and is_state('switch.adaptive_lighting_sleep_mode_basement_studio','off') %}
{% if is_state('switch.adaptive_lighting_adapt_color_basement_studio','on') %}
{{ states('sensor.basement_studio_lights_colortemp_diff') }}
{% else %}
Color Off
{% endif %}
{% else %}
Adaptive Off
{% endif %}
{% else %}
Lights Off
{% endif %}
brightness_diff: >
{% set brightness = states('sensor.basement_studio_lights_brightness_diff') | float(0) %}
{% if is_state('light.basement_studio_lights','on') %}
{% if is_state('switch.adaptive_lighting_basement_studio','on') and is_state('switch.adaptive_lighting_sleep_mode_basement_studio','off') %}
{% if is_state('switch.adaptive_lighting_adapt_brightness_basement_studio','on') %}
{{ states('sensor.basement_studio_lights_brightness_diff') }}
{% else %}
Brightness Off
{% endif %}
{% else %}
Adaptive Off
{% endif %}
{% else %}
Lights Off
{% endif %}
device_class: problem
delay_on: "00:00:10"
- name: Living Room Sync Issue
unique_id: 35b3ca4f-14fb-4564-ab0c-1bb6a829c202
state: >
{% set colortemp = states('sensor.living_room_lights_colortemp_diff') | float(0) %}
{% set brightness = states('sensor.living_room_lights_brightness_diff') | float(0) %}
{% if is_state('light.living_room_lights','on') %}
{% if is_state('switch.adaptive_lighting_living_room','on') and is_state('switch.adaptive_lighting_sleep_mode_living_room','off') %}
{% if is_state('switch.adaptive_lighting_adapt_brightness_living_room','on') and is_state('switch.adaptive_lighting_adapt_color_living_room','on') %}
{{ (colortemp > 100 or colortemp < -100) or (brightness > 5 or brightness < -5) }}
{% elif is_state('switch.adaptive_lighting_adapt_brightness_living_room','on') and is_state('switch.adaptive_lighting_adapt_color_living_room','off') %}
{{ brightness > 5 or brightness < -5 }}
{% elif is_state('switch.adaptive_lighting_adapt_color_living_room','on') and is_state('switch.adaptive_lighting_adapt_brightness_living_room','off') %}
{{ colortemp > 100 or colortemp < -100 }}
{% endif %}
{% endif %}
{% endif %}
attributes:
color_diff: >
{% set colortemp = states('sensor.living_room_lights_colortemp_diff') | float(0) %}
{% if is_state('light.living_room_lights','on') %}
{% if is_state('switch.adaptive_lighting_living_room','on') and is_state('switch.adaptive_lighting_sleep_mode_living_room','off') %}
{% if is_state('switch.adaptive_lighting_adapt_color_living_room','on') %}
{{ states('sensor.living_room_lights_colortemp_diff') }}
{% else %}
Color Off
{% endif %}
{% else %}
Adaptive Off
{% endif %}
{% else %}
Lights Off
{% endif %}
brightness_diff: >
{% set brightness = states('sensor.living_room_lights_brightness_diff') | float(0) %}
{% if is_state('light.living_room_lights','on') %}
{% if is_state('switch.adaptive_lighting_living_room','on') and is_state('switch.adaptive_lighting_sleep_mode_living_room','off') %}
{% if is_state('switch.adaptive_lighting_adapt_brightness_living_room','on') %}
{{ states('sensor.living_room_lights_brightness_diff') }}
{% else %}
Brightness Off
{% endif %}
{% else %}
Adaptive Off
{% endif %}
{% else %}
Lights Off
{% endif %}
device_class: problem
delay_on: "00:00:10"
- sensor:
- name: "Basement Studio Lights - Brightness Actual"
unique_id: dee4dc84-a6a0-4150-903e-5b8bd436d962
state: >
{% from 'lighting.jinja' import get_brightness_pct %}
{{ get_brightness_pct('light.basement_studio_lights') }}
availability: "{{ is_state('light.basement_studio_lights','on') }}"
unit_of_measurement: '%'
icon: mdi:brightness-percent
- name: "Basement Studio Lights - Brightness Intended"
unique_id: 3542077f-24c6-460c-a73f-fe7bc8413b81
state: "{{ state_attr('switch.adaptive_lighting_basement_studio','brightness_pct') | float | round(2) }}"
availability: "{{ is_state('switch.adaptive_lighting_basement_studio','on') }}"
unit_of_measurement: '%'
icon: mdi:brightness-percent
- name: "Basement Studio Lights - Colortemp Actual"
unique_id: 93cb2a2f-c8a7-44bf-813f-26ce349a072f
state: "{{ state_attr('light.basement_studio_lights','color_temp_kelvin') | int }}"
availability: "{{ is_state('light.basement_studio_lights','on') }}"
unit_of_measurement: 'K'
icon: mdi:thermometer-lines
- name: "Basement Studio Lights - Colortemp Intended"
unique_id: 85d4b063-bae8-43c2-9fea-35820b13f26f
state: "{{ state_attr('switch.adaptive_lighting_basement_studio','color_temp_kelvin') | int }}"
availability: "{{ is_state('switch.adaptive_lighting_basement_studio','on') }}"
unit_of_measurement: 'K'
icon: mdi:thermometer-lines
- name: "Basement Studio Lights - Brightness Diff"
unique_id: ab24a44c-6c6b-4ae9-b256-52592b0503bb
state: >
{% set current = states('sensor.basement_studio_lights_brightness_actual') | float %}
{% set intended = states('sensor.basement_studio_lights_brightness_intended') | float %}
{{ (current - intended) | float | round(2) }}
availability: "{{ is_state('light.basement_studio_lights','on') and is_state('switch.adaptive_lighting_basement_studio','on') }}"
unit_of_measurement: '%'
icon: mdi:brightness-percent
- name: "Basement Studio Lights - Colortemp Diff"
unique_id: fecf7d42-9a5c-471e-9af3-e1a330a6ae3e
state: >
{% set current = states('sensor.basement_studio_lights_colortemp_actual') | float %}
{% set intended = states('sensor.basement_studio_lights_colortemp_intended') | float %}
{{ (current - intended) | float | round(2) }}
availability: "{{ is_state('light.basement_studio_lights','on') and is_state('switch.adaptive_lighting_basement_studio','on') }}"
unit_of_measurement: 'K'
icon: mdi:thermometer-lines
- name: "Living Room Lights - Brightness Actual"
unique_id: e557022a-184f-4111-bb6a-6c0869cce42c
state: >
{% from 'lighting.jinja' import get_brightness_pct %}
{{ get_brightness_pct('light.living_room_lights') }}
availability: "{{ is_state('light.living_room_lights','on') }}"
unit_of_measurement: '%'
icon: mdi:brightness-percent
- name: "Living Room Lights - Brightness Intended"
unique_id: a758742f-6724-4920-a9d1-325fe4f02664
state: "{{ state_attr('switch.adaptive_lighting_living_room','brightness_pct') | float | round(2) }}"
availability: "{{ is_state('switch.adaptive_lighting_living_room','on') }}"
unit_of_measurement: '%'
icon: mdi:brightness-percent
- name: "Living Room Lights - Colortemp Actual"
unique_id: dbe08826-e113-4474-bbca-60d3c32a4b65
state: "{{ state_attr('light.living_room_lights','color_temp_kelvin') | int }}"
availability: "{{ is_state('light.living_room_lights','on') }}"
unit_of_measurement: 'K'
icon: mdi:thermometer-lines
- name: "Living Room Lights - Colortemp Intended"
unique_id: 8b974c03-ab5b-4b89-97bf-afee78fa1a40
state: "{{ state_attr('switch.adaptive_lighting_living_room','color_temp_kelvin') | int }}"
availability: "{{ is_state('switch.adaptive_lighting_living_room','on') }}"
unit_of_measurement: 'K'
icon: mdi:thermometer-lines
- name: "Living Room Lights - Brightness Diff"
unique_id: 05f911d3-3b6a-4ca2-8181-5365707b2456
state: >
{% set current = states('sensor.living_room_lights_brightness_actual') | float %}
{% set intended = states('sensor.living_room_lights_brightness_intended') | float %}
{{ (current - intended) | float | round(2) }}
availability: "{{ is_state('light.living_room_lights','on') and is_state('switch.adaptive_lighting_living_room','on') }}"
unit_of_measurement: '%'
icon: mdi:brightness-percent
- name: "Living Room Lights - Colortemp Diff"
unique_id: d8fcaa26-d3dc-48d8-b4b9-9e701a1506a8
state: >
{% set current = states('sensor.living_room_lights_colortemp_actual') | float %}
{% set intended = states('sensor.living_room_lights_colortemp_intended') | float %}
{{ (current - intended) | float | round(2) }}
availability: "{{ is_state('light.living_room_lights','on') and is_state('switch.adaptive_lighting_living_room','on') }}"
unit_of_measurement: 'K'
icon: mdi:thermometer-lines
- name: "Basement LED Strip Resets"
unique_id: 0d016f09-a89b-4616-83b7-934580612d00
state: "{{ states('input_number.basement_led_strip_resets') | int }}"
unit_of_measurement: 'resets'
icon: mdi:restore
- name: Tina Desk Scene
unique_id: 0d94ba35-bc9d-40a2-aa77-776d26bc3538
state: >
{% if is_state('input_boolean.give_me_darkness','on') %}
Night Mode
{% elif is_state('binary_sensor.early_night_mode','on') and is_state('input_boolean.give_me_darkness','off') %}
Evening Mode
{% else %}
Day Mode
{% endif %}
icon: >
{% if is_state('input_boolean.give_me_darkness','on') %}
mdi:weather-night
{% elif is_state('binary_sensor.early_night_mode','on') and is_state('input_boolean.give_me_darkness','off') %}
mdi:lightbulb-night
{% else %}
mdi:lightbulb
{% endif %}
switch:
- platform: animated_scenes
name: Christmas
restore: False
restore_power: False
ignore_off: False
lights:
- light.front_porch_light
colors:
- color_type: rgb_color
color: [255,0,0]
brightness: 255
- color_type: rgb_color
color: [0,255,0]
brightness: 255
transition: 10
change_frequency: 60
change_amount: all
change_sequence: True
animate_brightness: True
animate_color: True
- platform: animated_scenes
name: Christmas Day
restore: False
restore_power: False
ignore_off: False
lights:
- light.living_room_color_1
- light.living_room_color_2
- light.living_room_color_3
- light.tina_lamp_top
- light.tina_lamp_side
- light.tina_desk_strip
colors:
- color_type: rgb_color
color: [255,0,0]
brightness: 255
- color_type: rgb_color
color: [0,255,0]
brightness: 255
transition: 1
change_frequency: 5
change_amount: 3
change_sequence: False
animate_brightness: True
animate_color: True
automation:
- id: 477e6e8a-4e33-4268-8c2d-f39902c0d64f
alias: Living Room Night Lighting
description: Provide lighting in case anyone needs to go downstairs in the middle of the night.
mode: restart
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: and
conditions:
- condition: trigger
id: motion-on
- condition: state
entity_id: input_boolean.night_mode
state: 'on'
sequence:
- service: timer.cancel
target:
entity_id: timer.living_room_motion_timer
- service: light.turn_on
target:
entity_id: light.first_floor_lights
- 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: and
conditions:
- condition: trigger
id: motion-off
- condition: state
entity_id: input_boolean.night_mode
state: 'on'
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
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
- service: script.stairwell_led_strip
data:
color_temp_kelvin: 2000
brightness: 50
- id: b897d714-bbf2-44ce-afaf-63cf3694351c
alias: Tina Desk Lights Handler
description: Handles turning on the desk lights with smart scene selection and also turning them off
mode: single
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
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
- 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
- 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
- delay:
seconds: 2
# The delay is to prevent the boolean from re-running the automation if the lights were turned on manually
- id: 47645bcf-a6ed-4c34-8ece-8daed4b10d9a
alias: Basement Lights Handling
description: Handles the presence-related automation of lights in the basement
mode: restart
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
- service: timer.cancel
target:
entity_id: timer.basement_studio_door_timer
- 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
- 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
- id: 7c3ca098-d0bb-49bf-a323-fc471dcf81d2
alias: Recliner Mode
description: For naptime in the basement
mode: restart
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
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
- service: script.turn_on
target:
entity_id: script.asus_laptop_displays_off
- if:
- condition: template
value_template: >
{% if is_state('media_player.basement_tv','playing') %}
false
{% elif is_state('media_player.basement_tv','paused') or is_state('media_player.basement_tv','idle') %}
{{ state_attr('media_player.basement_tv','app_name') in ['TV','Android TV Launcher'] }}
{% else %}
false
{% endif %}
then:
- service: media_player.turn_off
target:
entity_id: media_player.basement_tv
- 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
- 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
- service: script.turn_on
target:
entity_id:
- script.tony_desktop_displays_on
- script.asus_laptop_displays_on
- service: media_player.turn_on
target:
entity_id: media_player.basement_tv
- id: f4195b9a-3416-44b2-bef7-9826a126f0f2
alias: Basement Lights Adaptive Resync
description: Deals with situations where the basement lights should be adaptive but end up out of sync
mode: restart
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') }}"
- id: 75198e15-1e4a-4b1d-824a-23c9eaa73057
alias: Basement LED Strip Reset
description: Power cycle the LED strip when it goes unavailable
mode: single
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
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
- service: switch.turn_off
target:
entity_id: switch.basement_led_strip
- delay:
seconds: 20
- service: switch.turn_on
target:
entity_id: switch.basement_led_strip
- 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
- id: 3f05cd0d-bd6e-42c7-884d-3d1cbfda46e0
alias: Living Room Lights Adaptive Resync
description: Deals with situations where the living room lights should be adaptive but end up out of sync
mode: restart
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') }}"
script:
stairwell_led_strip:
alias: Stairwell LED Strip
description: This script handles a few settings for the stairwell LED strip, for convenience
mode: restart
sequence:
- variables:
brt1: 50
brt2: 100
brt3: 150
brtmax: 255
colortemp: >
{% if is_state('input_boolean.goodnight','off') and
is_state('input_boolean.give_me_darkness','off') and
is_state('binary_sensor.early_night_mode','off')
%}
4000
{% else %}
2000
{% endif %}
- 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') %}
{{ brt1 }}
{% elif is_state('input_boolean.give_me_darkness','on') %}
{{ brt2 }}
{% elif is_state('binary_sensor.early_night_mode','on') %}
{{ brt3 }}
{% else %}
{{ brtmax }}
{% endif %}
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) }}"
adaptive_on_first_floor:
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
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_living_room
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_living_room
- service: input_text.set_value
target:
entity_id: input_text.living_room_selected_scene
data:
value: Adaptive
- 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
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_dining_room_lamp
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_dining_room_lamp
- service: input_text.set_value
target:
entity_id: input_text.dining_room_lamp_selected_scene
data:
value: Adaptive
- 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
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_tina_lamp
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_tina_lamp
- 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
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_downstairs_bathroom
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_downstairs_bathroom
- service: input_text.set_value
target:
entity_id: input_text.downstairs_bathroom_selected_scene
data:
value: Adaptive
- 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
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_mud_room
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_mud_room
- service: input_text.set_value
target:
entity_id: input_text.mud_room_selected_scene
data:
value: Adaptive
adaptive_on_second_floor:
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
- 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
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_upstairs_hallway
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_upstairs_hallway
- service: input_text.set_value
target:
entity_id: input_text.upstairs_hallway_selected_scene
data:
value: Adaptive
- 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
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_master_bedroom
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_master_bedroom
- service: input_text.set_value
target:
entity_id: input_text.master_bedroom_selected_scene
data:
value: Adaptive
- 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
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_kallen_bedroom
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_kallen_bedroom
- service: input_text.set_value
target:
entity_id: input_text.kallen_bedroom_selected_scene
data:
value: Adaptive
- 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
else:
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_emma_bedroom
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_emma_bedroom
- service: input_text.set_value
target:
entity_id: input_text.emma_bedroom_selected_scene
data:
value: Adaptive
- 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
- service: switch.turn_on
target:
entity_id: switch.adaptive_lighting_upstairs_bathroom
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_upstairs_bathroom
- service: input_text.set_value
target:
entity_id: input_text.upstairs_bathroom_selected_scene
data:
value: Adaptive
bright_on_first_floor:
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
- service: input_boolean.turn_on
target:
entity_id: input_boolean.tina_desk_lights
- 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
bright_on_second_floor:
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
- 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
- if:
- condition: state
entity_id: input_boolean.emma_sleeping
state: 'off'
then:
- service: light.turn_on
target:
entity_id: light.emma_bedroom_light
- 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
evening_on_first_floor:
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
- 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
- if:
- condition: state
entity_id: timer.downstairs_bathroom_lights_timer
state: idle
then:
- service: light.turn_off
target:
entity_id:
- light.downstairs_bathroom_lights
- 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
- 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
- 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
- if:
- condition: state
entity_id: timer.downstairs_bathroom_lights_timer
state: idle
then:
- service: light.turn_off
target:
entity_id: light.downstairs_bathroom_lights
- service: input_boolean.turn_off
target:
entity_id: input_boolean.tina_desk_lights
- 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
evening_on_second_floor:
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') %}
Adaptive
{% else %}
Nightlight
{% endif %}
- service: light.turn_off
target:
area_id:
- kallen_bedroom
- master_bedroom
- emma_bedroom
- 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
- 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
- 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') %}
Adaptive
{% else %}
Nightlight
{% endif %}
- 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
- 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
- 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
- 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
goodnight_in_basement:
alias: 'Goodnight in Basement'
sequence:
- service: light.turn_off
target:
area_id:
- basement_studio
- furnace_room
- service: fan.turn_off
target:
entity_id: fan.basement_fan
goodnight_on_first_floor:
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
- 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
goodnight_on_second_floor:
alias: 'Goodnight on Second Floor'
sequence:
- service: light.turn_off
target:
area_id:
- emma_bedroom
- kallen_bedroom
- master_bedroom
- master_bedroom_closet
- 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
- if:
- condition: state
entity_id: input_boolean.kallen_overnight
state: 'on'
then:
- service: light.turn_off
target:
area_id: upstairs_bathroom
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
morning_scene:
alias: 'Morning Scene'
sequence:
- service: input_boolean.turn_off
target:
entity_id: input_boolean.master_bedroom_sleeping
- 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
- if:
- condition: state
entity_id: input_boolean.emma_sleeping
state: 'off'
then:
- service: light.turn_on
target:
entity_id: light.emma_bedroom_light
day_mode_in_tina_desk:
alias: Day Mode in Tina Desk
mode: restart
icon: mdi:palette
sequence:
- parallel:
- service: light.turn_on
target:
entity_id: light.tina_lamp_top
- service: light.turn_off
target:
entity_id: light.tina_lamp_side
- 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
evening_mode_in_tina_desk:
alias: Evening Mode in Tina Desk
mode: restart
icon: mdi:palette
sequence:
- parallel:
- service: light.turn_on
target:
entity_id: light.tina_lamp
- 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
night_mode_in_tina_desk:
alias: Night Mode in Tina Desk
mode: restart
icon: mdi:palette
sequence:
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_tina_lamp
- 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
bright_mode_in_tina_desk:
alias: Bright Mode in Tina Desk
mode: restart
icon: mdi:palette
sequence:
- service: switch.turn_off
target:
entity_id: switch.adaptive_lighting_tina_lamp
- 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
#! Unless there is a good reason, do not define multi-room scenes below.
#! Use scripts instead, to avoid some straight-up haunted house bullshit...
scene:
- name: Adaptive in Living Room
icon: mdi:palette
entities:
light.living_room_lights:
state: "on"
input_select.living_room_scenes:
state: "Adaptive"
- name: Bright in Living Room
icon: mdi:palette
entities:
input_select.living_room_scenes:
state: "Bright"
- name: Dimmed in Living Room
icon: mdi:palette
entities:
input_select.living_room_scenes:
state: "Dimmed"
- name: Nightlight in Living Room
icon: mdi:palette
entities:
input_select.living_room_scenes:
state: "Nightlight"
- name: Energize in Living Room
icon: mdi:palette
entities:
input_select.living_room_scenes:
state: "Energize"
- name: Concentrate in Living Room
icon: mdi:palette
entities:
input_select.living_room_scenes:
state: "Concentrate"
- name: Savanna Sunset in Living Room
icon: mdi:palette
entities:
input_select.living_room_scenes:
state: "Savanna Sunset"
- name: Tropical Twilight in Living Room
icon: mdi:palette
entities:
input_select.living_room_scenes:
state: "Tropical Twilight"
- name: Tokyo in Living Room
icon: mdi:palette
entities:
input_select.living_room_scenes:
state: "Tokyo"
- name: Forest Adventure in Living Room
icon: mdi:palette
entities:
input_select.living_room_scenes:
state: "Forest Adventure"
- name: Painted Sky in Living Room
icon: mdi:palette
entities:
input_select.living_room_scenes:
state: "Painted Sky"
- name: Adaptive in Downstairs Bathroom
icon: mdi:palette
entities:
light.downstairs_bathroom_lights:
state: "on"
input_select.downstairs_bathroom_scenes:
state: "Adaptive"
- name: Bright in Downstairs Bathroom
icon: mdi:palette
entities:
input_select.downstairs_bathroom_scenes:
state: "Bright"
- name: Dimmed in Downstairs Bathroom
icon: mdi:palette
entities:
input_select.downstairs_bathroom_scenes:
state: "Dimmed"
- name: Nightlight in Downstairs Bathroom
icon: mdi:palette
entities:
input_select.downstairs_bathroom_scenes:
state: "Nightlight"
- name: Adaptive in Dining Room Lamp
icon: mdi:palette
entities:
input_select.dining_room_lamp_scenes:
state: "Adaptive"
- name: Bright in Dining Room Lamp
icon: mdi:palette
entities:
input_select.dining_room_lamp_scenes:
state: "Bright"
- name: Dimmed in Dining Room Lamp
icon: mdi:palette
entities:
input_select.dining_room_lamp_scenes:
state: "Dimmed"
- name: Nightlight in Dining Room Lamp
icon: mdi:palette
entities:
input_select.dining_room_lamp_scenes:
state: "Nightlight"
- name: Adaptive in Tina Lamp
icon: mdi:palette
entities:
light.tina_lamp:
state: "on"
input_select.tina_lamp_scenes:
state: "Adaptive"
- name: Energize in Tina Lamp
icon: mdi:palette
entities:
input_select.tina_lamp_scenes:
state: "Energize"
- name: Bright in Tina Lamp
icon: mdi:palette
entities:
input_select.tina_lamp_scenes:
state: "Bright"
- name: Nightlight in Tina Lamp
icon: mdi:palette
entities:
input_select.tina_lamp_scenes:
state: "Nightlight"
- name: Adaptive in Mud Room
icon: mdi:palette
entities:
light.mud_room_overhead:
state: "on"
input_select.mud_room_scenes:
state: "Adaptive"
- name: Bright in Mud Room
icon: mdi:palette
entities:
input_select.mud_room_scenes:
state: "Bright"
- name: Dimmed in Mud Room
icon: mdi:palette
entities:
input_select.mud_room_scenes:
state: "Dimmed"
- name: Nightlight in Mud Room
icon: mdi:palette
entities:
input_select.mud_room_scenes:
state: "Nightlight"
- name: Adaptive in Upstairs Hallway
icon: mdi:palette
entities:
light.hallway_overhead:
state: "on"
input_select.upstairs_hallway_scenes:
state: "Adaptive"
- name: Bright in Upstairs Hallway
icon: mdi:palette
entities:
input_select.upstairs_hallway_scenes:
state: "Bright"
- name: Dimmed in Upstairs Hallway
icon: mdi:palette
entities:
input_select.upstairs_hallway_scenes:
state: "Dimmed"
- name: Nightlight in Upstairs Hallway
icon: mdi:palette
entities:
input_select.upstairs_hallway_scenes:
state: "Nightlight"
- name: Adaptive in Upstairs Bathroom
icon: mdi:palette
entities:
light.upstairs_bathroom_lights:
state: "on"
input_select.upstairs_bathroom_scenes:
state: "Adaptive"
- name: Bright in Upstairs Bathroom
icon: mdi:palette
entities:
input_select.upstairs_bathroom_scenes:
state: "Bright"
- name: Dimmed in Upstairs Bathroom
icon: mdi:palette
entities:
input_select.upstairs_bathroom_scenes:
state: "Dimmed"
- name: Nightlight in Upstairs Bathroom
icon: mdi:palette
entities:
input_select.upstairs_bathroom_scenes:
state: "Nightlight"
- name: Single Nightlight in Upstairs Bathroom
icon: mdi:palette
entities:
input_select.upstairs_bathroom_scenes:
state: "Single Nightlight"
- name: Adaptive in Master Bedroom
icon: mdi:palette
entities:
light.master_bedroom_lights:
state: "on"
input_select.master_bedroom_scenes:
state: "Adaptive"
- name: Bright in Master Bedroom
icon: mdi:palette
entities:
input_select.master_bedroom_scenes:
state: "Bright"
- name: Dimmed in Master Bedroom
icon: mdi:palette
entities:
input_select.master_bedroom_scenes:
state: "Dimmed"
- name: Nightlight in Master Bedroom
icon: mdi:palette
entities:
input_select.master_bedroom_scenes:
state: "Nightlight"
- name: Front Nightlight in Master Bedroom
icon: mdi:palette
entities:
input_select.master_bedroom_scenes:
state: "Front Nightlight"
- name: Side Nightlight in Master Bedroom
icon: mdi:palette
entities:
input_select.master_bedroom_scenes:
state: "Side Nightlight"
- name: Adaptive in Kallen Bedroom
icon: mdi:palette
entities:
light.kallen_bedroom_lights:
state: "on"
input_select.kallen_bedroom_scenes:
state: "Adaptive"
- name: Bright in Kallen Bedroom
icon: mdi:palette
entities:
input_select.kallen_bedroom_scenes:
state: "Bright"
- name: Dimmed in Kallen Bedroom
icon: mdi:palette
entities:
input_select.kallen_bedroom_scenes:
state: "Dimmed"
- name: Nightlight in Kallen Bedroom
icon: mdi:palette
entities:
input_select.kallen_bedroom_scenes:
state: "Nightlight"
- name: Overhead Nightlight in Kallen Bedroom
icon: mdi:palette
entities:
input_select.kallen_bedroom_scenes:
state: "Overhead Nightlight"
- name: Wall Nightlight in Kallen Bedroom
icon: mdi:palette
entities:
input_select.kallen_bedroom_scenes:
state: "Wall Nightlight"
- name: Adaptive in Emma Bedroom
icon: mdi:palette
entities:
light.emma_bedroom_light:
state: "on"
input_select.emma_bedroom_scenes:
state: "Adaptive"
- name: Bright in Emma Bedroom
icon: mdi:palette
entities:
input_select.emma_bedroom_scenes:
state: "Bright"
- name: Dimmed in Emma Bedroom
icon: mdi:palette
entities:
input_select.emma_bedroom_scenes:
state: "Dimmed"
- name: Nightlight in Emma Bedroom
icon: mdi:palette
entities:
input_select.emma_bedroom_scenes:
state: "Nightlight"
- name: Adaptive in Basement Studio
icon: mdi:palette
entities:
light.basement_studio_lights:
state: "on"
input_select.basement_studio_scenes:
state: "Adaptive"
- name: Energize in Basement Studio
icon: mdi:palette
entities:
input_select.basement_studio_scenes:
state: "Energize"
- name: Concentrate in Basement Studio
icon: mdi:palette
entities:
input_select.basement_studio_scenes:
state: "Concentrate"
- name: Bright in Basement Studio
icon: mdi:palette
entities:
input_select.basement_studio_scenes:
state: "Bright"
- name: Dimmed in Basement Studio
icon: mdi:palette
entities:
input_select.basement_studio_scenes:
state: "Dimmed"
- name: Nightlight in Basement Studio
icon: mdi:palette
entities:
input_select.basement_studio_scenes:
state: "Nightlight"
- name: Relax in Basement Studio
icon: mdi:palette
entities:
input_select.basement_studio_scenes:
state: "Relax"
- name: Purple in Basement Studio
icon: mdi:palette
entities:
input_select.basement_studio_scenes:
state: "Purple"
- name: Pink in Basement Studio
icon: mdi:palette
entities:
input_select.basement_studio_scenes:
state: "Pink"
- name: Kallen Reading in Basement Studio
icon: mdi:palette
entities:
input_select.basement_studio_scenes:
state: "Kallen Reading"
- name: Baby Is Napping in Basement Studio
icon: mdi:palette
entities:
input_select.basement_studio_scenes:
state: "Baby Is Napping"
- name: Stairwell in Basement Studio
icon: mdi:palette
entities:
input_select.basement_studio_scenes:
state: "Stairwell"