Update Theater Lighting Automations
This commit is contained in:
@@ -41,11 +41,88 @@ scene:
|
|||||||
entities:
|
entities:
|
||||||
light.living_room_light: "off"
|
light.living_room_light: "off"
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# Lighting Scripts
|
||||||
|
script:
|
||||||
|
|
||||||
|
# Update Home Theater Lighting State
|
||||||
|
ht_player_lighting_update:
|
||||||
|
alias: Home Theater Lighting State Update
|
||||||
|
mode: restart
|
||||||
|
sequence:
|
||||||
|
- alias: Only run during Twilight/Night
|
||||||
|
condition: "{{ state_attr('sun.sun', 'elevation') < 0 }}"
|
||||||
|
|
||||||
|
# Select Home Theater Player State
|
||||||
|
- choose:
|
||||||
|
# Playing
|
||||||
|
- conditions: "{{ is_state('input_select.ht_player_state', 'Playing') }}"
|
||||||
|
sequence:
|
||||||
|
- choose:
|
||||||
|
- conditions: "{{ is_state('input_select.ht_lighting_mode', 'Normal') }}"
|
||||||
|
sequence:
|
||||||
|
- service: scene.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: scene.home_theater_dim
|
||||||
|
data:
|
||||||
|
transition: 3
|
||||||
|
- conditions: "{{ is_state('input_select.ht_lighting_mode', 'Theater') }}"
|
||||||
|
sequence:
|
||||||
|
- service: scene.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: scene.home_theater_off
|
||||||
|
data:
|
||||||
|
transition: 3
|
||||||
|
|
||||||
|
# Paused
|
||||||
|
- conditions: "{{ is_state('input_select.ht_player_state', 'Paused') }}"
|
||||||
|
sequence:
|
||||||
|
- choose:
|
||||||
|
- conditions: "{{ is_state('input_select.ht_lighting_mode', 'Normal') }}"
|
||||||
|
sequence:
|
||||||
|
- service: scene.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: scene.home_theater_dim
|
||||||
|
data:
|
||||||
|
transition: 3
|
||||||
|
- conditions: "{{ is_state('input_select.ht_lighting_mode', 'Theater') }}"
|
||||||
|
sequence:
|
||||||
|
- service: scene.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: scene.home_theater_dim
|
||||||
|
data:
|
||||||
|
transition: 3
|
||||||
|
|
||||||
|
# Stopped
|
||||||
|
- conditions: "{{ is_state('input_select.ht_player_state', 'Stopped') }}"
|
||||||
|
sequence:
|
||||||
|
- choose:
|
||||||
|
- conditions: "{{ is_state('input_select.ht_lighting_mode', 'Normal') }}"
|
||||||
|
sequence:
|
||||||
|
- service: scene.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: scene.home_theater_low
|
||||||
|
data:
|
||||||
|
transition: 3
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# Lighting Automations
|
# Lighting Automations
|
||||||
automation:
|
automation:
|
||||||
|
|
||||||
# Automations for Home Theater
|
# Automations for Home Theater
|
||||||
|
- alias: Home Theater Lighting
|
||||||
|
mode: queued
|
||||||
|
trigger:
|
||||||
|
- platform: homeassistant
|
||||||
|
event: start
|
||||||
|
- platform: state
|
||||||
|
entity_id: input_select.ht_player_state
|
||||||
|
- platform: numeric_state
|
||||||
|
entity_id: sun.sun
|
||||||
|
attribute: elevation
|
||||||
|
below: 0
|
||||||
|
action:
|
||||||
|
- service: script.ht_player_lighting_update
|
||||||
|
|
||||||
# Automations for Bedroom Nightstand Lamps
|
# Automations for Bedroom Nightstand Lamps
|
||||||
- alias: Jen Nightstand Lamp
|
- alias: Jen Nightstand Lamp
|
||||||
|
|||||||
Reference in New Issue
Block a user