Smart plug daily energy consumption is resetting at the wrong time

I have a series of smart plugs I’ve flashed with ESPHome, and they report daily energy usage. I’ve noticed some issues when trying to aggregate that data into a monthly Utility Meter, and in investigating I noticed that the “day” seems to be resetting at 10am (see graph below). I’m in Pacific/Honolulu, so this seems to coincide with our GMT-10 offset.

I’ve checked the following, and so far everything seems to be set properly:

  • NTP server for in the ESPhome firmware definition is configured for Pacific/Honolulu
  • HA is set to the correct time zone in the UI
  • The HA VM displays the correct time from the command line (running date)
  • The Proxmox host for the VM displays the correct time

Any idea where to check/adjust to correct this so I can get a proper 24h metering?

Trying using HA time for the devices instead of NTP. Will report if this solves it.

:thinking:

Back to this again. I can confirm my devices are incorrectly offsetting their time by double the amount of my timezone offset. My Home Assistant server is set to my local timezone (Pacific/Honolulu, which is GMT-10), and I’ve configured my ESPHome devices with the recommended:

time:
  - platform: homeassistant
    id: homeassistant_time 

however the logfile timestamps are showing up as an additional -10hrs (i.e. if it’s 5pm local time the log files show 7am). The devices are applying the offset to the server time, which is already offset.

Worth mentioning that looking at the logs for the devices, the startup message shows

INFO ESPHome 2025.4.0
INFO Reading configuration /config/esphome/<device>.yaml...
INFO Detected timezone 'Pacific/Honolulu'

So it knows the correct timezone, it’s just applying it twice it seems.