Counters not updated
HerveB opened this issue · comments
Is there a way to refresh the counters? It seems the counters are updated only when the integration starts in Home Assistant.
There is no way that I know of of refreshing the counter when it is changed through some mechanism outside of this library. There is no notification that it has changed.
The only thing possible is to add a function to that HASS could invoke to retrieve the current value of a counter. Is that useful for your use case?
Thanks for your response. That would work. I don't need to trigger anything when the counter changes so a call to a function (exposed as a service in HA?) is perfectly fine for my use case.
Yes, it would be a service in HA.
This would be great!
ElkM1 library code written. HA code to be completed. Will link HA PR here when submitted.
Thanks so much!
PR submitted to HA. home-assistant/core#41867
PR merged; will be in next HA release (docs are lagging behind and may miss next release).