Running HA in a docker and I’m trying to access a host ‘du -hs’ command line sensor to check a RAID array’s usage. I think in theory I could mount the array to the docker and run the du inside the docker but thinking down the line to call a remote file system via ssh and pass the output into HA as sensor data.
Ended up doing the second option. Wrote and .sh script and execute it from a local ssh command on the HA host. The output is written to a .txt file that HA then presents as a file sensor. Works good enough.
@ironlion27: Might you share your solution?
ssh [USER]@[HOST] “/usr/bin/python3 /home/[USER]/.homeassistant/python_scripts/m1.py > /home/[USER]/.homeassistant/tmp/m1.txt”
The python script just runs BeautifulSoup and prints data. Then HA picks up the .txt file as a sensor.