Curl call with cookie returning raw json


I need some guidance on a curl call i would like to make in home assistant to get some json attributes.
I would like to make this call once a day but still get the state attributes on home assistant restart.

curl -c $cookie -b $cookie  -H 'Connection: keep-alive' -H 'sap-alias: <uname>' -H 'sap-password: <pwd>' URL HERE

The call returns JSON

{"partner_id" :"","account_number" :"","contract" :"","device" :"","no_mrorder" :true,"type" :"","type_description" :"","ad_formatted" :"","mr_front" :0,"mr_back" :0.00000000000000,"mr_unit" :"KL","mr_last_date" :"","reading_exceeded" :false,"meter_reading" :"","mr_info" :"No entry possible. Next scheduled entry date is 2020/03/12","meter_reading_with_unit" :"","dec_vor" :"05","dec_nach" :"06","register" :"000"}

I wanted to know what i could use to call this once per day and then to keep it in states.


Maybe through a command line sensor? You can define the scan interval there. However you need to check if it gets refreshed on home assistant restart. Otherwise you could probably create an automation that updates the sensor on restart.