Testing pull requests via Custom Components

Hi, first time creating a topic so I hope I’m not messing up opening it here. I would like to test the modification in this pull request (I’m actually forced to, since the one implemented now in the official release keeps turning my soundbar on) but I can’t understand how to implement it as a custom component. I though it would be possible to install it via has but I can’t understand how I should configure it.
Thanks for the help!

You just create a folder inside your home assistant directory. /.homeassistant/custom_components

Here, the name of the folder should match the component you want to overwrite. Home Assistant will load these last.

So create /.homeassistant/custom_components/lg_soundbar folder and plop the new init, manifest and media_player files in here, then restart home assistant.

Once you want to revert back to the original one, you can just delete this folder and restart.

Great! Thanks! As this component uses a new version of python-temescal (in the manifest is reported “requirements”: ['temescal==0.3"] ) do i need to update it… somewhere? Or does home assistant take care of that in the process of setting up the custom component?

Hmm, good point. No, I don’t think home assistant will download those packages for you. It will use the manifest to check if the required version is installed.

pip3 install temescal would get the latest, but this will also overwrite the old one which might have some problems should anything else require it.

You can revert the version after you’re done testing.

alternative is to download the package manually, put it at “temescal_v3” or whatever. Make sure this path is in your python path. Then change the code to look for this lib instead.

Are you sure this is a new component though? The current lg_soundbar updated to temescal v 0.3 3 months ago. I’d guess you probably already have it unless you’re on a really old HA version.

Well, I’m on 0.118 and the custom component is not working correctly (my SK10Y is not added to `HA, but I’ve seen in the comments on the pull request that someone have tested it with the same model), so since I’m aware that the problem i have with the standard component is due to the polling method used to reach the soundbar and that the method should not be used anymore in v 0.2+, so i just assumed HA was still using an old version… I was probably too quick addressing that as the problem
EDIT: i’m just tired (and probably a bit stupid), it’s working fine! Thank you very very much for all the help and support!