mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 02:50:12 -04:00
43 lines
997 B
YAML
43 lines
997 B
YAML
alias: Front Room TV Playing
|
|
id: automation_front_room_tv_playing
|
|
trigger:
|
|
- platform: state
|
|
entity_id: media_player.front_room_tv
|
|
to: 'playing'
|
|
|
|
condition:
|
|
- condition: state
|
|
entity_id: input_boolean.lighting_automations
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: light.front_room_hue
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: sun.sun
|
|
state: 'below_horizon'
|
|
|
|
- condition: not
|
|
conditions:
|
|
- condition: state
|
|
entity_id: media_player.front_room_tv
|
|
attribute: 'source'
|
|
state: 'PBS KIDS'
|
|
- condition: state
|
|
entity_id: media_player.front_room_tv
|
|
attribute: 'source'
|
|
state: 'YouTube'
|
|
action:
|
|
- service: input_text.set_value
|
|
data_template:
|
|
entity_id: input_text.front_room_mode
|
|
value: "{{ states('input_select.front_room_mode') }}"
|
|
|
|
- service: input_select.select_option
|
|
data:
|
|
entity_id: input_select.front_room_mode
|
|
option: Dimmed
|
|
|
|
- service: automation.trigger
|
|
entity_id: automation.front_room_lights_to_on
|
|
|