I just looked at them, but don’t quite understand how to work with them (will have to read slowly once more )
Below are my updated automations; I would assume they’d work, but they don’t. Also, I had a condition like
condition:
condition: state
entity_id: media_player.plex_nvidia_shield_android_tv
state: "unavailable"
in the rule for the shield itself (so that the plex sensor will not mess with the playing/paused status for anything but plex itself), but that doesn’t work at all. Also, the media_player.plex_nvidia_shield_android_tv
entity does only then exist when it is running; once I close plex, the entity disappears until I start it again, making it very difficult (for me!) to work with that entity all together).
Therefore, I removed that condition. Now when I toggle play/pause, nothing happens with any of those lights. I noticed that sometimes!! the media_player.nvidia_shield
entity will toggle the status after I toggled it; however, sometimes this takes over half a minute, sometimes even longer, sometimes it won’t change states at all.
((usually when watching a movie and pausing, it’s to grab some water or for a bathroom break, so I cannot wait about a minute for the lights to turn on might as well be back by then))
automation:
- id: 'light_plex_pause'
alias: "[Licht] Plex Pause"
trigger:
- platform: state
entity_id: media_player.plex_shield_android_tv
from: "playing"
to: "paused"
action:
- service: python_script.light_store
data:
store_name: sz_nachttisch
entity_id: light.schlafzimmer_innr_light
- service: python_script.light_store
data:
store_name: sz_bett
entity_id: light.schlafzimmer_led_bett
- service: python_script.light_store
data:
store_name: sz_leiste
entity_id: light.sz_led_seite
- service: light.turn_on
data:
entity_id: light.schlafzimmer_innr_light
rgb_color: [255, 176, 67]
brightness: 55
transition: 5
color_temp: 500
- service: light.turn_on
data:
entity_id: light.schlafzimmer_led_bett
rgb_color: [255, 255, 255]
brightness: 50
transition: 5
effect: "None"
- service: light.turn_on
data:
entity_id: light.sz_led_seite
rgb_color: [255, 255, 255]
brightness: 50
transition: 5
effect: "static"
- id: 'light_plex_resume'
alias: "[Licht] Plex Resume"
trigger:
- platform: state
entity_id: media_player.plex_shield_android_tv
from: "paused"
to: "playing"
action:
- service: python_script.light_store
data:
store_name: sz_bett
operation: restore
- service: python_script.light_store
data:
store_name: sz_leiste
operation: restore
- service: python_script.light_store
data:
store_name: sz_nachttisch
operation: restore
- id: 'light_plex_off'
alias: "[Licht] Plex Aus"
trigger:
- platform: state
entity_id: media_player.plex_shield_android_tv
to: "unavailable"
action:
- service: pythong_script.light_store
data:
store_name: sz_bett
operation: restore
- service: pythong_script.light_store
data:
store_name: sz_leiste
operation: restore
- service: pythong_script.light_store
data:
store_name: sz_nachttisch
operation: restore
- id: 'light_shield_pause'
alias: "[Licht] Shield Pause"
trigger:
- platform: state
entity_id: media_player.nvidia_shield
from: "playing"
to: "paused"
action:
- service: python_script.light_store
data:
store_name: sz_nachttisch
entity_id: light.schlafzimmer_innr_light
- service: python_script.light_store
data:
store_name: sz_bett
entity_id: light.schlafzimmer_led_bett
- service: python_script.light_store
data:
store_name: sz_leiste
entity_id: light.sz_led_seite
- service: light.turn_on
data:
entity_id: light.schlafzimmer_innr_light
rgb_color: [255, 176, 67]
brightness: 55
transition: 5
color_temp: 500
- service: light.turn_on
data:
entity_id: light.schlafzimmer_led_bett
rgb_color: [255, 255, 255]
brightness: 50
transition: 5
effect: "None"
- service: light.turn_on
data:
entity_id: light.sz_led_seite
rgb_color: [255, 255, 255]
brightness: 50
transition: 5
effect: "static"
- id: 'light_nvidia_resume'
alias: "[Licht] Nvidia Resume"
trigger:
- platform: state
entity_id: media_player.nvidia_shield
from: "paused"
to: "playing"
action:
- service: python_script.light_store
data:
store_name: sz_bett
operation: restore
- service: python_script.light_store
data:
store_name: sz_leiste
operation: restore
- service: python_script.light_store
data:
store_name: sz_nachttisch
operation: restore