opower
A Python library and command-line tool for getting historical and forecasted usage/cost data from utilities that use opower.com.
This library is used by the Opower integration in Home Assistant.
Supported Utilities
- American Electric Power (AEP) subsidiaries
- AEP Ohio
- AEP Texas
- Appalachian Power
- Indiana Michigan Power
- Kentucky Power
- Public Service Company of Oklahoma (PSO)
- Southwestern Electric Power Company (SWEPCO)
- Burbank Water and Power (BWP)
- City of Austin Utilities
- Clark Public Utilities
- Consolidated Edison (ConEd) and subsidiaries
- Orange & Rockland Utilities (ORU)
- Duquesne Light Company (DQE)
- Evergy
- Eversource
- Exelon subsidiaries
- Atlantic City Electric
- Baltimore Gas and Electric (BGE)
- Commonwealth Edison (ComEd)
- Delmarva Power
- PECO Energy Company (PECO)
- Potomac Electric Power Company (Pepco)
- Glendale Water and Power (GWP)
- National Grid US subsidiaries
- National Grid Massachusetts
- National Grid NY Long Island
- National Grid NY Metro
- National Grid NY Upstate
- Northern Indiana Public Service Company (NIPSCO)
- Pacific Gas & Electric (PG&E)
- Puget Sound Energy (PSE)
- Rhode Island Energy (RIEnergy)
- Sacramento Municipal Utility District (SMUD)
- Seattle City Light (SCL)
- Southern Maryland Electric Cooperative (SMECO)
- Southwest Gas
Contributing
Contributions are welcome! Please feel free to submit a pull request.
Adding a New Utility
To add support for a new Opower-based utility, follow these steps:
- Verify it's an Opower utility: Use your browser's developer tools on your utility's website. If the network tab shows requests to a domain like
utility.opower.com, it's a good candidate. - Create a utility file: Add a new file in
src/opower/utilitiesthat inherits fromUtilityBase. Name the file after the utility's website (e.g.,newutility.pyfornewutility.com). - Respect scraping limitations: This library is used by Home Assistant and must adhere to its architecture rules. A headless browser cannot be a dependency, and HTML parsing is only allowed for the authentication phase.
An exception is made for the authentication phase. An integration is allowed to extract fields from forms. To make it more robust, data should not be gathered by scraping individual fields but instead scrape all fields at once.
Development environment
python3 -m venv .venv
source .venv/bin/activate
# for Windows CMD:
# .venv\Scripts\activate.bat
# for Windows PowerShell:
# .venv\Scripts\Activate.ps1
# Install dependencies
python -m pip install --upgrade pip
python -m pip install -e .
# Run pre-commit
python -m pip install pre-commit
pre-commit install
pre-commit run --all-files
# Run tests
python -m pip install -e ".[test]"
pytest
# Run command line
python -m opower --help
# To output debug logs and API responses to a file run:
python -m opower -vv 2> out.txt
# Build package
python -m pip install build
python -m build
Metadata
Release files for opower 0.20.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| opower-0.20.0.tar.gz | 57.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| opower-0.20.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 129.7 kB
Release files / opower-0.20.0.tar.gz
| Download URL | opower-0.20.0.tar.gz |
|---|---|
| Size | 57.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a963cee7dae100fe6c7a39cb13ddcd0a4d2db9675f77f241209c8d0b97278b7c
|
|
BLAKE2b-256 checksum How to use checksums |
0992efece6f38c5af0ecdb733d3acf8ce512b5c89345e11c4d76568eaf20bbd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.
Transparency logRelease files / opower-0.20.0-py3-none-any.whl
| Download URL | opower-0.20.0-py3-none-any.whl |
|---|---|
| Size | 72.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d8ad3ac3b1d3a2d8db7de135ff1918fdc60cf89b8274c782f95ab8f0d1bbcdd
|
|
BLAKE2b-256 checksum How to use checksums |
7779c1d533e98caec4ef4ca0251b26f0481da650d9b5fc432853ef69eb31aefb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.
Transparency log