How do you set the power on/off status for an IR device

I’m initially just trying to reproduce the functionality of my existing Harmony Elite remote, and want it to control TV, Soundbar, STB etc. I was able to use an integration for my LG TV, and just set up IR entities for the other devices. When I power on an activity, the status of the TV updates accordingly, but not the other IR devices used for a specific activity. Is there a way to toggle the Power status when a device is powered on/off? Sorry if this has been asked before, but I couldn’t find anything

What are names of the commands you turn the IR devices on and off? The remote only recognizes them if there are called POWER_ON and POWER_OFF (or POWER_TOGGLE).

Thanks for the response @kennymc.c. I’ll change that for all devices. My Samsung Soundbar only has a Power toggle, but I guess I can create POWER_ON and POWER_OFF using the same IR command
Thank you for your help

If you’re using Home Assistant I recommend installing the LG WebOS integration. It may not be auto discovered so go to HA settings, devices and integrations and add it manually following the link below. You can slowly move towards it. Better if using Ethernet for latency for not required. Just create some simple scripts for the various commands. It also has a notify service for text based notifications and announcements which I personally like and it also supports WOL.


I had to do this for some IR devices and it worked well. Bare in mind though, that the state will revert to “unknown” if the remote is restarted, as it doesn’t retain this.

At this time you cannot set state on the remote. There is a bug/feature request.

WRT Samsung Soundbar, Im hoping there is a discrete power on and off, ecen if the factory remote only shows toggle. It would be worth investigating if Glibal Cache or another source has the discrete IR codes.