I’m using the history endpoint to query the value of some entities as a function of time, i.e.
url = f"http://hass.address/api/history/period/{start_time}"
headers = {
"Authorization": f"Bearer {token}",
"content-type": "application/json",
}
params = {
"filter_entity_id" : "sensor.outdoor_temperature,climate.sonoff_trvzb_thermostat_2",
"end_time" : end_time
}
response = requests.get(url, headers=headers, params=params)
This only returns the state of the entity and not of the entity attributes (which are still available in the database). For the climate entity (which is a thermostat) the informations stored in the attributes are also important because they store the current temperature, target temperature…
Is there any way to get those through a call to the history endpoint?
I’ve looked into the docs but it seems this is not supported, although with the latest version of Home Assistant in the history tab it is indeed possible to export a CSV with the attribute data inside, so it must be possible somehow…