Sorry, very new here with home assistant and coding. Is there an easy way to have this information imported into home assistant?
I’ve converted the above curl command into a python script and I’ve been testing it on my Windows machine. I can get it to post and get the json data or print the info.
What would be the best way to implement this in Home Assistant so that the json data is imported into Home Assistant. I can get to the information fine and print it. response = requests.post('http://ci.draftserver.com/penrith/webservice/location/search', headers=headers, data=data) data = response.text json_object = json.loads(data) print(json_object['results'][0]['item_garbage']) print(json_object['results'][0]['item_recycling']) print(json_object['results'][0]['item_organic'])
I then thought maybe I could schedule a daily run of the python script and save the to say data.json to /config/www/ and the process the file with home assistant so that it’s an entity and the information is taken and added as an attribute of the entity… just not getting anywhere.