Utility energy data integration via Green Button Connect

Hello all,

I've implemented utility energy data integration into Home Assistant via the Green Button Connect standard. GitHub repos:

Example from my own instance:

TL;DR how to use it:

NOTE: Currently the only utility supported is my own: Burlington Hydro in Ontario, Canada. Request utility support here.

If you are lucky enough to use an already supported utility, then:

  • Install the add-on via HACS
  • In "Integrations" add the "Open Green Button" integration
  • Follow the prompts to go through the authorization process
  • If the integration loaded successfully, then on the Energy dashboard, click "Edit" and "Add grid connection"
  • On "Energy imported from grid" choose the statistic with your utility energy usage in the drop-down
  • On "Cost tracking" choose "Use an entity tracking the total costs" and choose the statistic with your utility energy cost in the drop-down
  • Click "Save"

Background

What is Green Button

Green Button is a standard for consumers (via third parties) to retrieve utility energy data. It was created by The Green Button Alliance, and implemented by many utilities throughout Canada, the USA, and Europe.

Generally there are two ways for consumers to use this: Green Button "Download my Data" (DMD) or "Connect my Data" (CMD) . The former requires the consumer to log in to their utility and download the XML data, feeding it manually to some local tooling. "Connect my Data" provides an ongoing connection to tooling to download utility data via API and consume it.

This integration uses "Connect my Data" to provide an end-to-end hands-off integration with Home Assistant.

How does it Work?

Green Button Connect requires the consumer to complete an OAuth2 third-party authorization that allows the selected pre-registered third party to access data on the consumer's behalf. Each utility needs an OAuth2 redirect URI to a stable URL operated by the pre-registered third party data consumer. This approach does not work well with user-managed Home Assistant deployments, as each and every end-user would need to register with their utility as a Green Button third-party data consumer, and connect their local Home Assistant instance to the utility via a public URL.

My approach allows the Home Assistant Community to register the endpoints for a shared thin stateless server component once for each utility. Then, each of us connects and authorizes our individual Home Assistant instances to our own utility account. The HA add-in is responsible for downloading the data and updating the Home Assistant statistics -- but it connects to the stateless server component, which simply proxies the request to the selected utility.

Where is my Data Stored?

The server component provides a stable URL for oauth callbacks and basic error handling, but is otherwise stateless. Your individual utility data is not stored in any way within the server component, unlike other Green Button Connect third-party providers. Even authorization tokens are stored in Home Assistant, and passed to the proxy as needed. The only storage of your authorization and energy data is in your own Home Assistant instance.

The only reason requests are proxied via the stateless server is to deal transparently with authorization failures and token refreshes.

FAQs

I'll keep this section updated as comments and questions arrive.

How much does it cost?

Nothing.

That being said, if this integration is useful to you and you want to help keep it maintained and the costs for hosting the proxy server covered, I'd certainly appreciate a tip:

3 Likes

I am floored there are no comments.. This is Awesome!! I submitted a Utility request. I have wanted this for a couple years!!!

1 Like

Utility updates:

  • :white_check_mark: Live! Consumers Energy (Michigan, USA), thank you Michael Phillippi (@philliml74).
  • :white_check_mark: Live! Kentucky Utilities (Kentucky, USA), thank you Tag Howard (@jthoward64).

Utility updates:

  • :white_check_mark: Live! Elk Energy (Ontario, Canada).
  • :white_check_mark: Live! Enwin (Ontario, Canada).
  • :white_check_mark: Live! Festival Hydro (Ontario, Canada).
  • :white_check_mark: Live! London Hydro (Ontario, Canada).
  • :white_check_mark: Live! Newmarket-Tay (NT) Power (Ontario, Canada).
  • :white_check_mark: Live! Niagara Peninsula Energy (Ontario, Canada).
  • :white_check_mark: Live! Oakville Hydro (Ontario, Canada).
  • :white_check_mark: Live! Oshawa Power (Ontario, Canada).
1 Like

With this is mind should we be creating two dashboards comparing the cost since it wont always match the device/floor usage vs the utility company?

This is awesome! I have been trying to figure out how to do this forever. I do have a question though. I have integrated this for Consumers Energy but for the last 36 hours or so the only data I have gotten into Home Assistant appears to be my singular month totals. I have not seen any hourly data populate. Does this just take awhile?

@colemad5 It appears to be quite utility specific. My own utility sends usage data about 3 to 4 days delayed, and only sends cost data a few days after the end of the billing period. A future version may add cost estimators that use downloaded or manually entered cost information to estimate costs which are replaced by actuals when the utility data arrives. But that feature does not yet exist.

More utilities went live:

  • :white_check_mark: Live! Alectra (Ontario, Canada).
  • :white_check_mark: Live! Elexicon Energy (Ontario, Canada), thank you Muhammad Aziz (@rabbitholelabsinc).
  • :white_check_mark: Live! Eversource (Massachusetts, USA), thank you Devin Kelly (@dwwkelly).
  • :white_check_mark: Live! Hydro Ottawa (Ontario, Canada), thank you Mike Wrightly (@mikewrightly).
  • :white_check_mark: Live! Milton Hydro (Ontario, Canada), thank you Jeff Aycan (@JAudi23).
1 Like

Great seeing this data coming into Home Assistant! My utility isn’t supported yet but it’s great to see this data (finally!) becoming more accessible.

Burlington Hydro users may want to be aware that issue #42 is still present on the latest build (f66efb7).

I updated from 5b60604 to f66efb7, restarted Home Assistant, enabled debug logging, downloaded diagnostics, and ran greenbutton.rebuild_statistics.

Diagnostics show:

• last_update_success = true
• last_fetched_at = 2026-08-09
• 17,472 electricity readings successfully parsed
• current IntervalBlock data through August 9, 2026
• feed updated on August 10, 2026

However:

• Home Assistant statistics are not advancing.
• Electricity remains stuck at July 16, 2026.
• Water remains stuck at July 18, 2026.
• Weekly and monthly statistics are unavailable.
• Fourteen-day and thirty-day graphs show “No statistics found.”

The diagnostics also indicate that the feed-level timestamp may be incorrectly interpreted as the UsagePoint timestamp (2004-06-18), although that may be a separate issue.

I’ve added the complete investigation and diagnostics summary to GitHub issue #42.

If any other Burlington Hydro users are seeing the same behaviour, additional confirmation would probably be helpful.

Update after the latest fix:

The electricity side is now working for me on Burlington Hydro. After updating, restarting Home Assistant and rebuilding statistics, the new Open Green Button electricity statistic is current and my weekly/monthly/yearly usage and 14/30-day graphs are populated again.

Water is still not advancing. My existing water statistic remains at July 18, 2026.

I downloaded fresh diagnostics today. The coordinator reports available: true, last_update_success: true, and no exception, but the latest Green Button response contains only one UsagePoint with service_kind: ELECTRICITY. I do not see a WATER UsagePoint in the current response.

So the original electricity statistics issue appears fixed on my system, while the remaining problem is that Burlington’s current Green Button response is not returning the water UsagePoint.

Happy to provide a redacted diagnostics summary if useful.

Sounds cool!

  • How is this different from the Opower integration?
  • Also, anybody know how often Eversource (Massachusetts) sends updated data via this integration?
    I noticed that the energy dashboard you shared shows daily usage.
    ALso, know that for Eversource, Opower creates 8 new entities delivers only one new, delayed energy consumption data point per day – which is really not very useful if you want to track and optimize actual energy consumption.

Thank you for creating this solution, many of us have been wanting to connect Canadian electricity providers to Home Assistant.

When I learned that for Green Button data to work you need be a registered third-party I quickly realized it’s not feasible for every HA user to be one. Thus your solution to this is greatly appreciated and welcomed.

I am concerned about privacy. I’m also not a programmer and I’m having a hard time understanding the two paragraphs below about the server being stateless and the data being stored in HA? For a non-programmer, what does stateless mean? If we have to go thru https://opengreenbutton.org to connect to our utility, does that mean that after the initial connection Home Assistant fetches data directly from the utility?