ha-myenergi
ha-myenergi copied to clipboard
"Last Updated" entity that stores the date/time the integration last retrieved response from myenergi API
Please would you consider adding an entity that holds a timestamp of when the integration last received a response from the myenergi API?
Unless there's a way to do this using a Helper/Template in Home Assistant?
Example of two sensor entities from the GivTCP integration:
https://github.com/search?q=repo%3AGivEnergy%2Fgiv_tcp%20last_updated_time&type=code
+1, this would be really helpful to be able to set alerts so we know when data isn't getting updated!
I did find you can use something like this, and since the latest update it's pretty accurate:
states.sensor.myenergi_my_home_home_consumption.last_changed
+1 .... seen myenergi server go down, but not away that the data was "out of date"
I had this issue with a previous version of ha-myenergi and HA (I don't know which was the problem specifically): the myenergi servers were up but they hadn't received new data in a while so they returned the old data with the last timestamp.
Then the last_updated
timestamp in HA would be updated to the current time, so it made it look like the data was recent.
Last night I updated HA to 202306.03 and this plugin to the latest version too. Now the last_updated
timestamp is correct and it doesn't update until the myenergi API has a newer timestamp.
This should address the feature request I think? If so, this issue can probably be closed.
Will give last_updated
and last_changed
a look.