Energy is integrated over exact wall-clock intervals: the module latches a measurement window atomically and the host integrates true active power over the elapsed time, so there's no on-device counter to quantize or drift. In the ESPHome component, the accumulated energy is persisted to the ESP32's NVS, so an energy total survives a reboot or brownout without a gap or reset in Home Assistant. In a bare-Arduino sketch, the host owns the running total — persist it yourself (e.g. to an SD card) if you need it across power cycles.