I know there is a better way to perform this automation based on the templates I have seen, but I have had problems putting it together. So I thought I would show how it is working now with a lot of triggers.
alias: Living Room - Recess Lights On/Off/Brightness
description: >-
Turn on Media Can Lights on and off based on TV state and adjust the
brightness
trigger:
- platform: time
id: 25% @ Home
at: "08:00:00"
alias: 25% @ Home
- platform: time
at: "22:00:00"
id: time off early scheduled
alias: time off early scheduled
- platform: time
at: "23:00:00"
id: time off late
alias: time off late
- platform: time
at: "17:00:00"
id: 50% @ Work
alias: 50% @ Work
- platform: time
at: "11:00:00"
id: 50% home
alias: 50% home
- platform: time
at: "13:00:00"
id: 75% home
alias: 75% home
- platform: time
at: "19:00:00"
id: 25% @ Work
alias: 25% @ Work
- platform: state
entity_id:
- media_player.livingroomstereo
to: "off"
id: Stereo turned off
- platform: time
at: "23:59:59"
alias: Off Midnight
id: Off Midnight
condition:
- condition: state
entity_id: input_boolean.automations_kill_switch
state: "off"
- condition: state
entity_id: person.brad
state: home
action:
- choose:
- conditions:
- condition: trigger
id: 25% @ Home
sequence:
- service: light.turn_on
data:
brightness_pct: 25
target:
entity_id:
- light.wled_lr_left_3
- light.wled_lr_right_2
- light.wled_lrtop
- service: select.select_option
data:
option: Default
target:
entity_id:
- select.wled_lr_left_preset_3
- select.wled_lr_right_preset_2
- select.wled_lrtop_preset
- conditions:
- condition: trigger
id: 50% @ Work
sequence:
- service: light.turn_on
data:
brightness_pct: 50
target:
entity_id:
- light.wled_lr_left_3
- light.wled_lr_right_2
- light.wled_lrtop
- conditions:
- condition: trigger
id: time off early scheduled
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.wled_lr_left_3
- light.wled_lr_right_2
- light.wled_lrtop
- conditions:
- condition: trigger
id: time off late
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.wled_lr_left_3
- light.wled_lr_right_2
- light.wled_lrtop
- conditions:
- condition: trigger
id: 50% home
sequence:
- service: light.turn_on
data:
brightness_pct: 50
target:
entity_id:
- light.wled_lr_left_3
- light.wled_lr_right_2
- light.wled_lrtop
- conditions:
- condition: trigger
id: 25% @ Work
sequence:
- service: light.turn_on
data:
brightness_pct: 25
target:
entity_id:
- light.wled_lr_left_3
- light.wled_lr_right_2
- light.wled_lrtop
- service: select.select_option
data:
option: Default
target:
entity_id:
- select.wled_lr_left_preset_3
- select.wled_lr_right_preset_2
- select.wled_lrtop_preset
- conditions:
- condition: trigger
id: 75% home
sequence:
- service: light.turn_on
data:
brightness_pct: 75
target:
entity_id:
- light.wled_lr_left_3
- light.wled_lr_right_2
- light.wled_lrtop
- conditions:
- condition: trigger
id: Stereo turned off
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.wled_lr_left_3
- light.wled_lr_right_2
- light.wled_lrtop
- conditions:
- condition: trigger
id: Stereo turned off
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.wled_lr_left_3
- light.wled_lr_right_2
- light.wled_lrtop
- conditions:
- condition: or
conditions:
- condition: trigger
id: time off late
- condition: trigger
id: Off Midnight
sequence:
- service: light.turn_off
data: {}
target:
entity_id:
- light.wled_lr_left_3
- light.wled_lr_right_2
- light.wled_lrtop
mode: single