Modify external pip libraries

Hi all,
I would like to update a HA component, but I need to make some changes to an external library loaded as a requirement. In hassbian I could just change the file in the dependencies directory. How can I do that in Hassio?

The component I’m going to fiddle with is “honeywell.py”, and I need to add some debug code in the evohomeclient library.

Thanks.

Hi,

You will probably need to access the host via debug mode

Then you can edit the honeywell.py or copy it to a share and edit externally.
You basically have the host OS (resinOS) that is running homeassistant in a alpine linux container.

After logged in to the host you can run commands like this to copy the file to the common share folder:
docker exec homeassistant cp /usr/lib/python3.6/site-packages/homeassistant/components/climate/honeywell.py /share

Edit and then copy the file back in a similar fashion.
Note that when you reboot the host, the file will be back to original.
You can restart hassio via web ui or run docker restart homeassistant without losing changes.

Thank you for your explanation.

For the honeywell.py component, I already made a copy in che custom_components folder, named honeywell2.py and used that in my configuration. My question was about the evohomeclient library that is a requirement of the component, and is downloaded automatically by HA using PIP.

I guess I can use the docker commands you explained to access the dependencies folder and change the files in there too.