2018-03-06 16:10:52 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
# Media
|
|
|
|
#
|
|
|
|
############
|
|
|
|
|
2018-03-19 10:41:37 +00:00
|
|
|
# - 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
|
2018-03-06 16:10:52 +00:00
|
|
|
|
2018-03-19 10:41:37 +00:00
|
|
|
# - 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
|
2018-03-06 16:10:52 +00:00
|
|
|
|
2018-03-19 10:41:37 +00:00
|
|
|
# - 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: script.house_lights_up
|
2018-03-09 13:36:43 +00:00
|
|
|
|
2018-03-06 16:10:52 +00:00
|
|
|
|
|
|
|
# - 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
|