Dim living room lights when watching Plex
This commit is contained in:
parent
a5dbf57e65
commit
77d71bf7fc
|
@ -59,3 +59,49 @@
|
|||
platform: state
|
||||
from: not_home
|
||||
to: home
|
||||
- action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.dimmed_brightness
|
||||
alias: Dim when Plex is active
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: media_player.plex_ps4
|
||||
to: playing
|
||||
from: idle
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: light.living_room
|
||||
state: 'on'
|
||||
- action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.nighttime_brightness
|
||||
alias: Restore nighttime lights after Plex
|
||||
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'
|
||||
- action:
|
||||
- service: scene.turn_on
|
||||
entity_id: scene.normal_brightness
|
||||
alias: Restore normal lights after Plex
|
||||
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'
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
group.all_automations:
|
||||
hidden: false
|
||||
group.all_scripts:
|
||||
hidden: false
|
11
groups.yaml
11
groups.yaml
|
@ -22,6 +22,13 @@ Entertainment:
|
|||
- group.chromecast
|
||||
- group.consoles
|
||||
|
||||
Automation:
|
||||
view: yes
|
||||
name: Automation
|
||||
entities:
|
||||
- group.all_scripts
|
||||
- group.all_automations
|
||||
|
||||
livingroom_lights:
|
||||
name: Living Room
|
||||
entities:
|
||||
|
@ -30,6 +37,9 @@ livingroom_lights:
|
|||
- scene.bright
|
||||
- scene.energize
|
||||
- scene.stephanie
|
||||
- scene.normal_brightness
|
||||
- scene.nighttime_brightness
|
||||
- scene.dimmed_brightness
|
||||
|
||||
bedroom_lights:
|
||||
name: Bedroom
|
||||
|
@ -68,3 +78,4 @@ phones:
|
|||
entities:
|
||||
- device_tracker.homeassistant_pixel
|
||||
- device_tracker.StephaniesIphone
|
||||
|
||||
|
|
15
scenes.yaml
15
scenes.yaml
|
@ -16,6 +16,21 @@
|
|||
state: on
|
||||
brightness: 254
|
||||
xy_color: [0.3146,0.3303]
|
||||
- name: Normal Brightness
|
||||
entities:
|
||||
light.living_room:
|
||||
state: on
|
||||
brightness_pct: 100
|
||||
- name: Nighttime Brightness
|
||||
entities:
|
||||
light.living_room:
|
||||
state: on
|
||||
brightness_pct: 60
|
||||
- name: Dimmed Brightness
|
||||
entities:
|
||||
light.living_room:
|
||||
state: on
|
||||
brightness_pct: 20
|
||||
- name: Dawn
|
||||
entities:
|
||||
light.standing_lamp:
|
||||
|
|
Loading…
Reference in New Issue