I have 2 LG WebOS TV’s “working” in home assistant.
I have the wake on lan automation working.
So, I have a button on the dashboard that turns on the TV. My Google assistant is connected to HA, and I can turn the TV on and off with voice commands etc .
But for the life of me, I cannot see how to add an action in an automation which turns it on.
When I create a “device” action and select the TV, the pulldown to select an action is disabled and just says “no actions”.
Obviously, HA knows how to turn the TV on since it works from the dashboard and via Google assistant voice commands… But I just can’t find a way to create actions to control the TV via automations.
If I look at the device itself and try to add an automation that way, it gives me options to create automations which use the TV as a trigger, or a condition, but no actions. It feels conspicuously absent.
What am I missing?
I think I can probably get around it by directly using the wake on lan service, and the generic WebOS command service… But this does not feel like the correct way and is pretty fragile and tedious.
You need to control the service and not the device.
So in automations you will need to call the service media_player.turn_off and media_player.turn_on
In automations → actions you can select Call a Service and from that search for the commands you see above. (And many more like select the source and so on)
After you select the service you can pick the device or a room so you could turn on all mediaplayers for example in the livingroom.
Ahhhh
It’s curious. With most (all?) my other automations, I select the device 1st, and the action 2nd.
I wonder why media devices are the other way around.
Either way… works perfectly now. Thanks!
Selecting first the device and then the entity actually makes the automation do a double service call.
First on the device then on the entity.
A turn_on or turn_off service call makes no difference in that case, but a toggle service call would actually just reset the device back to where it was before.