Spent a good few hours trying to figure out how to get access to the components folder without going through the whole USB key transfer steps documented in https://developers.home-assistant.io/docs/operating-system/debugging/#ssh-access-to-the-host
I host HASS on Proxmox and so following the whole USB loading to gain ssh wasn’t a good method for me. Instead here’s how I did it
A small disclaimer here:
Proceed only if you know exactly what you’re doing. I will not be personally responsible or provide solutions if you break anything in HA and can’t revert your changes. There IS a good reason for keeping this out of reach in GUI.
Go into the Proxmox console and type
docker ps -a
Shows you all the docker containers currently running on the OS
docker exec -it homeassistant /bin/bash
to get into the container’s environment
This is where you can find the custom_components folder that everyone has access to
The components folder is located here - /usr/src/homeassistant/homeassistant
In my case what I needed to do was clone an unreleased commit into the integration folder. I did it by uploading the file into custom_components and then moving it into the relevant integration folder.
The changed file was
I made a backup of the current one and copied the updated copy into the integration folder before restarting HA.
##In the integration components folder (eg. /usr/src/homeassistant/homeassistant/components/myintegration/) mv __init__.py __init__.py.bak cp /config/custom_components/__init__.py __init__.py