New to HA. Having trouble with LG C1 turning off through automation

Hi all,

To the point.
I have integrated my LG C1 with HA.
I can turn this device off via the web UI.

When I set up an automation to turn the TV at a set time, the time trigger gets triggered, but the tv doesn’t, and thus doesn’t turn off.

Its the only LG device I have, so I’m sure I’m choosing the right device in the automation.

Any ideas.
Cheers,
Rizzle

Can we see the automation?

Morning mate, thanks for taking a look. Something I did notice. On the web UI (Lovelace I think it’s called?), When I go into settings on the LG card, it shows as an entity not a device. I’m not here if this means anything in this situation

Automation:

Web UI

I don’t know anything about LG, but I think your action should probably involve calling a service - you seem to be introducing a condition. The service will probably be media_player.turn_off, then the entity to be turned off will be media_player.lg_webos_smart_tv

Generally, the device is the physical thing and entities are attributes that can be manipulated - some devices have loads of them. If you go to Settings | Devices & Services you’ll see that cards typically have " one device" and “xx entities”. You normally work with the entities rather than the devices.

PS…

A general point about posting here: it’s much easier for people to help if you post code rather than screenshots. To get this for an automation, open it in the UI and click on the edit in YAML option. Copy it and paste it into your post as preformatted text (</> in the toolbar). It should look something like this:

- id: '1585436271551'
  alias: First Light
  description: Turns off lights when light rises above 500 lux. 
  trigger:
  - platform: state
    entity_id:
    - binary_sensor.daytime
    to: 'on'
  condition: []
  action:
  - service: switch.turn_off
    target:
      entity_id: switch.landing_socket_1
    data: {}
  - service: light.turn_off
    target:
      entity_id: light.yard_1
    data: {}
  mode: single

You need to use preformatted text because the indentations at the beginning of each line are important.

Thank you very much! Problem sorted.
Thanks for your firendly advice and for helping me through this problem. Nice to see frienfly and helpful users towards newbies here.

Thanks again!
Rizzle

1 Like