I have a early version up and running. The repo is here and can be added as a custom repository in HACS: GitHub - mjmeli/ha-duke-energy-gateway: Uses the Duke Energy Gateway to import near real time energy u
I’ve been working through a few bugs but it seems to be pretty stable now. When you configure it with your email/password, it will attempt to find your meter automatically. Hopefully it does.
It creates an entity that tracks the current day’s total energy usage. That data comes from summing the minute-by-minute data since midnight local time. The meter will reset at midnight.
There’s one big issue with the API though. Unfortunately while the data is technically at the minute level, it looks like they are caching the data for 15 minutes so there will be delays of 15 minutes between readings :(. That means data could appear attributed to the wrong hour (e.g. if a reading was at 6:55, we won’t get the next reading until 7:10, so the 5 minutes from 6:55-7:00 will be attributed to the 7:00 hour). The same issue exists at midnight and means losing data.
However overall this is a big improvement over the options before as there was no way to get “today’s” data at all. The hour-by-hour data in the energy dashboard is pretty close to what I see in the app.
And obviously this API is completely unofficial so I’d suspect some brittleness.
Also note there’s a breaking change coming in 2021.9 with how meters are tracked. I’ll have to put a fix together before updating. That probably means issues if you are on beta.