Access python core folder of Raspberry PI HA OS

I am running Home Assistant OS on Raspberry PI.
I want to modify air_quality.py file. I see no such file/folder in / root directory or any sub directories, where is it located?
Screenshot_2022-08-23_02-29-04

I see core folder is hidden under bashio and some images, but I am not sure how can I modify that. How can I do that?

The only way I know to do this is to gain access to the HAOS linux shell (via the console or via ssh using port 22222) and execute docker exec -it homeassistant /bin/bash. This will put you in a bash shell inside the homeassistant core docker container. You can find your file at /usr/src/homeassistant/homeassistant/components/xiaomi_miio/.

Just be aware, any changes you make will be blown away on the next core upgrade.

5 Likes