LG TV netcast control

Hi, I have the os version of home assistant. I want to control my LG television (netcast). There is no way I haven’t tried. My guess is that I need to use the lg_netcast platform but I don’t know how. I would be very happy if you help.

Great, so can I edit the lg_netcast.py file? I also want to send different commands

No idea.
I just found the integration.
My LG TV is a newer kind. :slight_smile:

1 Like

What lg_netcast.py file?

Do you mean the files in the lg_netcast directory?

Yes it’is. Where’is the directory

Do you mean where is the directory on your system? It is inside the homeassistant docker container.

But you can’t edit that, at least not in any meaningful way as it will revert to the container version after a restart.

Instead you should:

  1. copy the directory to /config/custom_components so you end up with those four files in /config/custom_components/lg_netcast/

  2. Add a version number in manifest.json.

  3. restart HA. You will then be using the version in custom_components and can change it to your heart’s content. And it isn’t in the container, so it will stay changed.

See this thread too How to create a custom component from one removed from HA itself

Do bear in mind though that the communication with the LG hardware will be in the pypi package pylgnetcast==0.3.7. If you need to change that python package you are talking a whole different thing.

1 Like

Of course you can also go the whole hog and set up a proper dev environment per these docs. Overkill for just hacking one integration though.

1 Like

thank you :slight_smile: