I have a sensor which receives my energy usage with a 2 days delay. It has the actual meter reading date as an attribute. When making graphs and the likes, it’s showing the date/time when the sensor was updated, rather than the meter reading date. I was thinking I can make a template sensor that converts my current sensor to use the meter reading date as the timestamp instead. Is this possible?
I wonder if this would be possible by running a simple SQL update to set sensor read timestamp to the timestamp that is received in the sensor data or simply by n days. I’ve tried the later once, but I could not see any difference on my Energy statistics page. I’m guessing, that updating the sensor table is nout enough and the statistics and statistics_shost_term tables would need to be altered as well. It’s a question though wether there are any assumptions anywhere in HASS, that timestamps only increase in a table;