#Using JSON timestamp for history graph

1 messages · Page 1 of 1 (latest)

covert dragon
#

I have HA sensors set up to receive mqtt readings. The JSON packet contains a timestamp (GMT). I would like to use this for the time scale in the history graph. A search found a number of references (mostly old) indicating that it was not possible. I'm wondering if there is a work around for this.

When the Pimoroni enviro sends a reading and the connection fails, the readings are queued. When there is a successful connection, all of the queued readings are sent. HA just marks this burst readings as all coming in at the same time.

Thanks, Curt

rich apex
#

I have been trying this as well, since I made an IOT device that goes into deepsleep after doing a measuremente and then with intervals of an hour it switches on the WiFi in order to send the sensordata. Using MQTT Discovery Interface it is then transferred to HA. But HA seems to work with internal timestamps of the moment of arrival of the MQTT Sensor message. That is a big shame for Energy Conserving Devices in the open field. I would like to have this implemented in some way in the HA MQTT Interface so sensordata are time-labeled

buoyant jackal
#

It's doable if you have an external database set up (as you can run sql commands to insert whatever data you like) but really not recommended in general. HA just isn't built to handle past data and it would (for example) not trigger automations properly