[plex] Only restore lights if plex dimmed them
This commit is contained in:
parent
947376f381
commit
4d57d538c0
|
@ -1,8 +1,16 @@
|
|||
input_boolean:
|
||||
plex_dimmed_lights:
|
||||
name: Lights have been dimmed
|
||||
initial: off
|
||||
|
||||
automation:
|
||||
- alias: Dim lights for movie
|
||||
action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.dimmed_brightness
|
||||
- service: input_boolean.turn_on
|
||||
data:
|
||||
entity_id: input_boolean.plex_dimmed_lights
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: media_player.plex_ps4
|
||||
|
@ -25,6 +33,9 @@ automation:
|
|||
{% else %}
|
||||
scene.normal_brightness
|
||||
{% endif %}
|
||||
- service: input_boolean.turn_off
|
||||
data:
|
||||
entity_id: input_boolean.plex_dimmed_lights
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: media_player.plex_ps4
|
||||
|
@ -34,6 +45,9 @@ automation:
|
|||
- condition: state
|
||||
entity_id: light.living_room
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.plex_dimmed_lights
|
||||
state: 'on'
|
||||
|
||||
group:
|
||||
Plex:
|
||||
|
|
Loading…
Reference in New Issue