Hi all new to HA. Very nice project. Trying to dog down some issues I’m having with an integration.
Retrieving power meter data every minute and returning data to ha with the built in functions. (I know this is happening from logs and values changing on ha display).
When I chart a. history and export chart to csv I see very irregular intervals (when I know intervals are regular at 1min within a hundred or so ms). I know the value is changing (may be many decimal places down, but it is changing).
Any ideas? Have not dug into the code for history. Is there something that delays recording entry of change is too small until something like 2 times the poll rate?
The sensor may send values every minute but if the value has not changed the state will not be updated in the recorder (that would be very inefficient for database size). e.g. this sensor sends values every 3 minutes:
However you can see long intervals where the state is a constant value. Only the changes are logged to the recorder database.
You can not assume a constant recording interval even if the polling interval is constant. This is why timestamps are downloaded alongside the values.
Thanks Tom. See your name quite a bit on here. Response is very much appreciated.
I’ll watch it closer and be sure I am not mistaken, was thinking maybe it wouldn’t log values changing more than 3 decimals out or something stupid. Just pulled up some test code and saw some duplicate values (which most of the other times I’ve been watching it hasn’t been that way). Running test code to try to catch a broken response from an api from time to time. There has been some data quality issues with integration I’m fixing for years. No problem with integration, but with api its reading. Making sure have all my ducks in a row before I put a pull request in.