Having trouble to get my Nvidea remote integration to turn on my Zigbee TV LED lights. I can turn the LEDs on manually from the dashboard and I can see the Nvidea remote device go to ON when I turn on the Remote but my Automation does not work. Any sugesstions appreciated.
alias: Turn On TV LED When Shield Is On
description: "Turn TV LED On Blue "
trigger:
- platform: device
device_id: b1d5d9c910415b879a08177432d99ea7
domain: media_player
entity_id: 739c2d5a4c1a531cc0a0da5fb66137ee
type: turned_on
condition: []
action:
- service: light.turn_on
metadata: {}
data:
rgb_color:
- 47
- 15
- 210
target:
entity_id: light.living_room_tv_led_lights_light
device_id: 982219dbd749f86074db5dcaf434a009
mode: single`Preformatted text`
Sorry to throw yet another link to a post at you, but it is an important one, and there’s a lot of good info on the forum: avoid using device ids:
It is hard to tell what this device trigger does. In this case a state trigger would be what you need. In order to see what state you are aiming for, go to the developer tools, search for the entity of the media player you are interested in. Now perform the action you want to react to, and see what the state changes to. It looks something like this:
Most likely, in this case, the state is on, but it may also be something else, like playing. Use that as to: in the state trigger. You may also want to consider putting both on and playing in the trigger, but start with only one and expand if you miss some events.
Then in the action, use only the entity id, not the device id.
i don’t have an nvidia shield… so i don’t know what it’s “on” state is or even if it has an on vs off. but i recall from helping others is that it has “playing” as a state.
so maybe try this and see if this turns the light on when you have it play media. note that i nuked your device id’s (consistent with @Edwin_D edwin_d’s rec) and put a placeholder entity_id. replace that entity_id with the correct entity_id for your shield.
alias: Turn On TV LED When Shield Is On
description: "Turn TV LED On Blue "
trigger:
- platform: state
entity_id: media_player.living_room_nvidia_shield
to: 'playing'
condition: []
action:
- service: light.turn_on
metadata: {}
data:
rgb_color:
- 47
- 15
- 210
target:
entity_id: light.living_room_tv_led_lights_light
mode: single`Preformatted text`
One more thing to remember: the automation won’t run if the state of the media payer already is what the trigger specifies. It needs to change to it from something else to what you specify, then it fires.