I created a simple automation where when I turn On the LG OLED TV using the LG WebOS TV integration, the Govee backlights turn On as well using the MQTT integraion. I created the same for when the LG TV is turned Off as well. I don’t know what I’m doing wrong because the Govee Lights do not turn On when the TV is turned On. Has someone created a similar automation using these types of devices?
Without the automations shown here it will be hard to say what is wrong.
Hi,
Why is the Sony device a trigger in this scenario?
Why not build a trigger with LG OLED media status?
description: ""
mode: single
triggers:
- trigger: state
entity_id:
- media_player.lg_tv
from:
- "on"
id: lg_oled_on
- trigger: state
entity_id:
- media_player.lg_tv
id: lg_oled_off
to:
- "off"
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- lg_oled_on
sequence: []
- conditions:
- condition: trigger
id:
- lg_oled_off
sequence: []
I’m trying to do the same on both a Sony TV as well as an LG TV. I finally got the Sony TV and Govee to work. I had to use “BRAVIA XBR-43X800D” rather than Sony. I also had to use “Sony Govee Power Switch” rather than just Sony Govee to get it to work. I will try the LG next.
The LG with Govee automations is not working when doing the same as I did with the Sony TV that worked. Here is a screenshot of the LG automation:
Any thought of what might be the reason it won’t work? Maybe someone that has an LG TV with automations working.
You should be able to view it as YAML by clicking the three dots in the upper right corner.
It is easier for us to read the YAML than a screen shot of the GUI.
Hi,
@s795723 please don’t ignore what Wally is trying to tell you. You will get more effective help on this forum when you post your automation in .yaml format.
In your Home Assistant automation, you can navigate via the below route to the .yaml code of the automation. Copy (ctrl+c) the code.
On this forum when you’re typing a new post, use the below option to paste (ctrl+v) the .yaml code.

Here is the YAML code:
alias: Turn On Govee H6199
description: ""
triggers:
- device_id: d3fad877e68a1c68fbf2f8f6ba0248f1
domain: media_player
entity_id: c3dbb7a8fd2d102c29f25743d90db8c2
type: turned_on
trigger: device
conditions: []
actions:
- type: turn_on
device_id: 365dc5c814616bf09b23a4764422e78b
entity_id: 6a288bcaa1f7870ec7f536f826a4e3ef
domain: switch
mode: single
It seems to be more because of the LG TV using the LG WebOS TV integration more than because of the MQTT code.
First you should replace those device IDs with entity IDs.
Read this to get the long explanation for it:
Secondly I am unsure of your trigger.
I would probably use a state trigger instead and react to the state on, which is what my LG TV report when it is on.
Not sure what a “state trigger” is but I left everything the same except adding the entity name and it seems to be working now. I’ll test for a couple of days. I did notice that the LG TV is indicating “unavailable” on the Home Assistant app even though I have it set with a static IP. Anyone know what might be causing the “unavailable” issue?
“Unavailable” is the new “Off” since a few months ![]()
I had to update all my lg tv automations and templates because of this change.
When you turn your TV off, the state of the lg oled mediaplayer will change to “off” or “unavailable”" or will first show “off” and a few moments later “unavailable”.




