Getting access to the underlying HA files

I have HA installed in a VirtualBox on windows. This has worked well for long but now I need to access the files to edit a file to make an integration work.
But, I have no idea how to access the files. If I understand correctly the actual resides in a container that is not accessible from the normal ssh terminal. Please explain if this is wrong, I’m struggling here.

How do I access the underlying HA files?

Like you want to change the python? Don’t do that. I could tell you how but it wouldn’t survive a restart so kind of pointless.

If you don’t like how a custom integration is behaving then you can edit it’s code by finding it in /config/custom_components. If you don’t like how a core integration is behaving then you can copy it’s folder from here into /config/custom_components and adjust it there. When you do that then your copy in the custom_components folder wins over the core one and it uses your code.

If you do change a component locally like this just be aware that you will have do apply all future updates to that component manually. I would strongly suggest putting in a PR to fix the issue or add the feature you’re missing so you don’t get stuck maintaining an override long term and hit weird issues in a future update.

Everything you need is in that link. Mike isn’t wrong. You should be copying to a custom component though.

Thanks a lot. It’s that growatt integration that I rely on for a lot of solar energy optimizations. Every so often Growatt changes something and while the HA growatt team fixes this fast it sometimes takes a while before a new HA version is released with it. When it’s not working it’s €€€ lost - not a lot, but a little every day adds up.
I will try to do what you said for the growatt integration. Its really nice to have the flexibility to do so for future changes. Thanks again, much appreciated.

Host os access actually won’t help here. That gives you access to everything mounted as volumes in the containers but the python code is baked into the HA image. You can go into the container and futz with it using the docker cli but like I said that won’t survive a restart.

The custom component path is really the only option here. Or I guess building a custom HA image with new code and retagging it so supervisor picks it up instead. But that seems way worse and will have to be repeated every time you want to update HA.