zaptec icon indicating copy to clipboard operation
zaptec copied to clipboard

Add state-less statistics entity for use with Energy Dashboard

Open steinmn opened this issue 5 months ago • 3 comments

Inspired by https://www.home-assistant.io/integrations/tibber/

This allows for properly backdating hourly power consumption which solves the offset issue seen in #162 and #103

Will require implementing the chargehistory-api, and probably pagination as well.

steinmn avatar Aug 22 '25 20:08 steinmn

This is the code for Tibber: https://github.com/home-assistant/core/tree/dev/homeassistant/components/tibber

sveinse avatar Sep 29 '25 20:09 sveinse

More specifically, the _insert_statistics function is what we need to learn from: https://github.com/home-assistant/core/blob/dev/homeassistant/components/tibber/coordinator.py#L70

steinmn avatar Sep 29 '25 20:09 steinmn

Will require implementing the chargehistory-api, and probably pagination as well.

Yes and good. I was worried there for a second that we needed to make the integration hold history. Let's cross our fingers that Zaptec portal contains all information we need to implement this.

sveinse avatar Sep 29 '25 20:09 sveinse