2018-05-17 17:27:46 +00:00
|
|
|
automation:
|
|
|
|
- alias: Dim when Plex is active
|
|
|
|
action:
|
|
|
|
- service: scene.turn_on
|
|
|
|
entity_id: scene.dimmed_brightness
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: media_player.plex_ps4
|
|
|
|
to: playing
|
|
|
|
from: idle
|
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: light.living_room
|
|
|
|
state: 'on'
|
|
|
|
- alias: Restore nighttime lights after Plex
|
|
|
|
action:
|
|
|
|
- service: scene.turn_on
|
|
|
|
entity_id: scene.nighttime_brightness
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: media_player.plex_ps4
|
|
|
|
to: idle
|
|
|
|
from: playing
|
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: light.living_room
|
|
|
|
state: 'on'
|
|
|
|
- condition: state
|
|
|
|
entity_id: sun.sun
|
|
|
|
state: 'below_horizon'
|
|
|
|
- alias: Restore normal lights after Plex
|
|
|
|
action:
|
|
|
|
- service: scene.turn_on
|
|
|
|
entity_id: scene.normal_brightness
|
|
|
|
trigger:
|
|
|
|
- platform: state
|
|
|
|
entity_id: media_player.plex_ps4
|
|
|
|
to: idle
|
|
|
|
from: playing
|
|
|
|
condition:
|
|
|
|
- condition: state
|
|
|
|
entity_id: light.living_room
|
|
|
|
state: 'on'
|
|
|
|
- condition: state
|
|
|
|
entity_id: sun.sun
|
|
|
|
state: 'above_horizon'
|
2018-06-14 20:38:20 +00:00
|
|
|
|
|
|
|
group:
|
|
|
|
Plex:
|
|
|
|
view: yes
|
|
|
|
icon: mdi:television
|
|
|
|
entities:
|
|
|
|
- group.plex_players
|
|
|
|
- group.plex_automations
|
|
|
|
plex_players:
|
|
|
|
name: Plex
|
|
|
|
entities:
|
|
|
|
- media_player.plex_ps4
|
|
|
|
plex_automations:
|
|
|
|
name: Automations
|
|
|
|
entities:
|
|
|
|
- automation.dim_when_plex_is_active
|
|
|
|
- automation.restore_nighttime_lights_after_plex
|
|
|
|
- automation.restore_normal_lights_after_plex
|