Skip to content

Bug: Energy Reporting with Hourly and Interval Usages #9

@virtitnerd

Description

@virtitnerd

System Health details

System Information

version core-2026.1.3
installation_type Home Assistant OS
dev false
hassio true
docker true
container_arch amd64
user root
virtualenv false
python_version 3.13.11
os_name Linux
os_version 6.12.63-haos
arch x86_64
timezone America/New_York
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 5000
Installed Version 2.0.5
Stage running
Available Repositories 2677
Downloaded Repositories 26
Solcast Solar
can_reach_server ok
Home Assistant Cloud
logged_in true
subscription_expiration November 29, 2026 at 7:00 PM
relayer_connected true
relayer_region us-east-1
remote_enabled true
remote_connected true
alexa_enabled true
google_enabled true
cloud_ice_servers_enabled true
remote_server us-east-1-18.ui.nabu.casa
certificate_status ready
instance_id 7f102ea707274f53af51d7dca6e471c1
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 17.0
update_channel stable
supervisor_version supervisor-2026.01.1
agent_version 1.8.1
docker_version 29.1.3
disk_total 48.5 GB
disk_used 19.5 GB
nameservers 2600:4040:60bb:9402::1, 2600:4040:60b3:ac03::1, 10.0.30.2
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization kvm
board ova
supervisor_api ok
version_api ok
installed_addons Matter Server (8.2.2), rtlamr2mqtt (2025.6.6), Terminal & SSH (9.22.0), Govee to MQTT Bridge (2025.11.25-60a39bcc), SQLite Web (5.0.0), Studio Code Server (6.0.1), ESPHome Device Builder (2026.1.3), Home Assistant Time Machine (2.2.0), Network UPS Tools (0.17.0), FiatChamp (3.0.8), Music Assistant (2.7.6), File editor (5.8.0)
Dashboards
dashboards 2
resources 12
views 4
mode storage
Network Configuration
adapters lo (disabled), enp6s18 (enabled, default, auto), hassio (disabled), docker0 (disabled), vethd04eb0f (disabled), vethad1157d (disabled), vethdaf81ae (disabled), veth14ee8b7 (disabled), vethb7cd0b9 (disabled), veth723585e (disabled), vethcc251c8 (disabled), veth12f30dc (disabled), veth28c0387 (disabled), veth81c6d5a (disabled), veth6a5f282 (disabled), veth964264f (disabled), vethe194432 (disabled), vetha4037cd (disabled)
ipv4_addresses lo (127.0.0.1/8), enp6s18 (10.0.30.10/24), hassio (172.30.32.1/23), docker0 (172.30.232.1/23), vethd04eb0f (), vethad1157d (), vethdaf81ae (), veth14ee8b7 (), vethb7cd0b9 (), veth723585e (), vethcc251c8 (), veth12f30dc (), veth28c0387 (), veth81c6d5a (), veth6a5f282 (), veth964264f (), vethe194432 (), vetha4037cd ()
ipv6_addresses lo (::1/128), enp6s18 (2600:4040:60bb:9402::18f3/128, 2600:4040:60bb:9402:17b1:2176:433d:535b/64, fe80::6968:fa65:cee2:936a/64), hassio (fd0c:ac1e:2100::1/48, fe80::4827:5dff:fe29:ac15/64), docker0 (fe80::4f1:83ff:fe5b:5768/64), vethd04eb0f (fe80::94d9:98ff:fec6:5790/64), vethad1157d (fe80::e8b2:41ff:fede:2be9/64), vethdaf81ae (fe80::1c35:73ff:fecc:a106/64), veth14ee8b7 (fe80::c825:baff:fe36:a32f/64), vethb7cd0b9 (fe80::783a:31ff:fe78:5a4f/64), veth723585e (fe80::a402:3ff:fe46:3c9b/64), vethcc251c8 (fe80::c879:e7ff:fe53:34e7/64), veth12f30dc (fe80::49b:1bff:feb5:9f71/64), veth28c0387 (fe80::a80d:50ff:fead:7aef/64), veth81c6d5a (fe80::f093:16ff:fe19:cae7/64), veth6a5f282 (fe80::44f6:aaff:fea2:d6e3/64), veth964264f (fe80::606c:7eff:fe55:17da/64), vethe194432 (fe80::c847:82ff:fee0:d6ee/64), vetha4037cd (fe80::e83a:77ff:fe3d:7e7b/64)
announce_addresses 10.0.30.10, 2600:4040:60bb:9402::18f3, 2600:4040:60bb:9402:17b1:2176:433d:535b, fe80::6968:fa65:cee2:936a
Recorder
oldest_recorder_run January 20, 2026 at 5:16 PM
current_recorder_run January 31, 2026 at 1:43 PM
estimated_db_size 716.11 MiB
database_engine sqlite
database_version 3.49.2

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of any previous issues..

Describe the issue

Hourly Usage is great for what happens during the past 24 hours but it's statistic should not be storing more than 2 days worth requiring cleanup as it causes then both Electric Interval Usage and Electric Hourly Usage to be reporting then for the same day.

Image Image

Suggestion

amiadapter-cu-uwp-sys can report up to the last 42.99 hours based on the current time (Anything more during testing would throw a 400), so any statistics data from amiadapter older than the last 42.99 hours should be discarded.
This is due to energyusage-cu-uwp-gql's Query only returning values for older than 2 days (48 hours from Midnight, not the current time) which would be at this point all vetted and system validated readings. There would be 5 hours missing each day in statistics until the energyusage-cu-uwp-gql catches up when the coordinator checks in again (Similar to OPower)

My Improvement suggestion would be to not have 2 separate statistics for Electricity and instead only keep one if design would allow for it.

On Integration First Setup, it does a Full import of all historical for the past 2 years (API only returns back up to 465 days from what I'm seeing but this may very. I haven't even had service setup at this address for that long but it will return historical from the prior owners). Once the Integration has been setup for the first time, it switches then to incremental imports from energyusage-cu-uwp-gql as well as amiadapter-cu-uwp-sys.

The Coordinator Sync for energyusage-cu-uwp-gql would only need to be once a day like OPower was doing it prior while amiadapter-cu-uwp-sys continues to do so hourly while also removing older values

As data gets added and removed, it keeps it more clean then within the statistics and viewing

We may need a statistic for power being returned to the grid for those with alternative energy sources if the response data has any negative values for that hour

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions