Create Speedtest Chart in Homeassistant from other Device(over RestAPI)

Hi,

iam new to home assistant, and have no idea how to solve my idea :slight_smile:
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