core
core copied to clipboard
Create Opower integration, currently only PG&E is supported
Proposed change
Create Opower integration. More than 175 utilities use Opower. Currently only Pacific Gas and Electric Company (PG&E) is supported (because that's my utility :) ) which is the largest (by revenue) utility in US. Anyone can update the underlying library to support logging in to their utility website and this integration should automatically pick up their utility after bumping the version.
Type of change
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
Additional information
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/26793
Checklist
- [x] The code change is tested and works locally.
- [x] Local tests pass. Your PR cannot be merged unless tests pass
- [x] There is no commented out code in this PR.
- [x] I have followed the development checklist
- [x] I have followed the perfect PR recommendations
- [x] The code has been formatted using Black (
black --fast homeassistant tests
) - [x] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for www.home-assistant.io
If the code communicates with devices, web services, or third-party tools:
- [x] The manifest file has all fields filled out correctly.
Updated and included derived files by running:python3 -m script.hassfest
. - [x] New or updated dependencies have been added to
requirements_all.txt
.
Updated by runningpython3 -m script.gen_requirements_all
. - [x] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [x] Untested files have been added to
.coveragerc
.
To help with the load of incoming pull requests:
- [ ] I have reviewed two other open pull requests in this repository.
I would also add into the description why only PG&E is supported and how future utilities could be added
I would also add into the description why only PG&E is supported and how future utilities could be added
Updated.
Just following up, @Lash-L any chance we can get this reviewed? :)
@borski I'm not a core maintainer. My review doesn't matter for anything other than just trying to help out
FYI, for anyone that will review this since https://developers.home-assistant.io/docs/review-process?_highlight=review#who-is-responsible-for-reviewing-prs recommends dropping a comment "I tested this using ... and it works", many users have started successfully using this via https://github.com/tronikos/opower-hacs See also https://community.home-assistant.io/t/pg-e-energy-monitoring-integration/336038
FYI, the underlying library now supports 8 utilities in US. The supported utilities serve over 15 million US households.
That's awesome. If I can express a wish to add support https://www.duquesnelight.com which also supports Opower. The API is at https://duq.opower.com.
Without access to an account I cannot support logging in to other utilities. You are on your own on that. Feel free to send me a PR to the underlying library https://github.com/tronikos/opower if you figure out how to programmatically login to your utility website and get the access token for opower. The current implementation for other utilities should help.
👀
Thanks. Addressing your comments in https://github.com/home-assistant/core/pull/95763