Hi,
iam new to home assistant, and have no idea how to solve my idea
Hopefully somebody else can help.
Short Explanation, iam running the speedtest-cli python script hourly on my nas an writing the result in a text file, but it would be awesome to have it as chart with download and upload entitys in homeassistant.
I had that working some time a go for pimatic , which looked like:
speedtest:
'python /volume2/web/speedtest/speedtest.py > $speedtest
dlspeed=$(cat $speedtest | grep âDownloadâ | awk â{print $2}â)
ulspeed=$(cat $speedtest | grep âUploadâ | awk â{print $2}â)
api call:
curl --silent -
X PATCH --header âContent-Type:application/jsonâ --user âadmin:passwordâ --data â{âtypeâ: âvalueâ, âvalueOrExpressionâ:â$dlspeedâ}â http://raspberrypi:85/api/variables/dlspeed
curl --silent -X PATCH --header âContent-Type:application/jsonâ --user âadmin:admin:passwordâ --data â{âtypeâ: âvalueâ, âvalueOrExpressionâ:â$ulspeedâ}â http://raspberrypi:85/api/variables/ulspeed
So now is the question how can i get the data to a entity in home assistant.
thanks in advanced for you help.
greetings
Ben