Hi,
I have created automations to turn on/off lights when the plex media player state changes on my Nvidia shield in my living room. The problem is that the state isnt communicated immediatly to home assistant and the lights change from on/off about 10-20 secs after the play/pause state of the media player alters.
Is there a better way to do this so when the media is played the lights turn off immediatly? My MQTT Sonoff outlets are able to switch states immediatly for instance.
alias: 'Plex Lamps1'
trigger:
platform: state
entity_id: media_player.plex_shield
from: 'idle'
to: 'playing'
action:
- service: homeassistant.turn_off
entity_id: group.lamps
- id: 453x
alias: 'Plex Lamps2'
trigger:
platform: state
entity_id: media_player.plex_shield
from: 'paused'
to: 'playing'
action:
- service: homeassistant.turn_off
entity_id: group.lamps
- id: 452x
alias: 'Plex Lamps3'
trigger:
platform: state
entity_id: media_player.plex_shield
from: 'playing'
to: 'paused'
action:
- service: homeassistant.turn_on
entity_id: group.lamps
- id: 452x
alias: 'Plex Lamps4'
trigger:
platform: state
entity_id: media_player.plex_shield
from: 'playing'
to: 'idle'
action:
- service: homeassistant.turn_on
entity_id: group.lamps