60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
#
|
|
#
|
|
# Media
|
|
#
|
|
############
|
|
|
|
- alias: "Movie Started - Turn Off Lights"
|
|
trigger:
|
|
- platform: state
|
|
entity_id: media_player.apple_tv
|
|
to: 'playing'
|
|
condition:
|
|
- condition: state
|
|
entity_id: sun.sun
|
|
state: 'below_horizon'
|
|
action:
|
|
- service: scene.turn_on
|
|
entity_id: scene.movie_time
|
|
|
|
- alias: "Movie Paused - Lights Dim"
|
|
trigger:
|
|
- platform: state
|
|
entity_id: media_player.apple_tv
|
|
from: 'playing'
|
|
to: 'paused'
|
|
condition:
|
|
- condition: state
|
|
entity_id: sun.sun
|
|
state: 'below_horizon'
|
|
action:
|
|
- service: scene.turn_on
|
|
entity_id: scene.livingroom_dim
|
|
|
|
# - alias: "Movie Stopped - Lights On"
|
|
# trigger:
|
|
# - platform: state
|
|
# entity_id: media_player.apple_tv
|
|
# from: 'playing'
|
|
# to: 'idle'
|
|
# condition:
|
|
# - condition: state
|
|
# entity_id: sun.sun
|
|
# state: 'below_horizon'
|
|
# action:
|
|
# - service: scene.turn_on
|
|
# entity_id: scene.livingroom_normal
|
|
|
|
# - alias: "Movie Resumed - Lights Off"
|
|
# trigger:
|
|
# - platform: state
|
|
# entity_id: media_player.apple_tv
|
|
# from: 'paused'
|
|
# to: 'playing'
|
|
# condition:
|
|
# - condition: state
|
|
# entity_id: sun.sun
|
|
# state: 'below_horizon'
|
|
# action:
|
|
# service: scene.turn_on
|
|
# entity_id: scene.movie_time |