DEPRECATED: Use Home Assistant's built-in OPower Integration, it now supports Portland General Electric, and their implementation is rock-solid.
- Have HACS installed, this will allow you to easily update
- Add
https://github.com/ejpenney/ha-portlandgeneral
as a custom repository as Type: Integration - Click install under "HA Portland General Electric"
- Restart Home Assistant.
Copy custom_components/portland_general_electric
into your Home Assistant config
directory.
- Restart HA
- Browse to your Home Assistant instance
- In the sidebar click on Settings.
- From the configuration menu select: Devices & Services.
- In the bottom right, click on the Add Integration button.
- From the list, search and select “HA Portland General Electric”.
- Follow the instruction on screen to complete the set up.
Based heavily on the work of portlandgeneral-api this component is meant to add energy usage entities to Home Assistant for Portland General Electric customers who don't have smart meters, or other means of live measurement. The hope is to use these in the Energy Dashboard
Hey dude! Help me out for a couple of 🍻 or a ☕!
It does not appear PGE updates this data until 24-48 hours after the fact, so it appears useless for "live" monitoring of usage. I've left it turned on while I continue to experiment.
PGE's daily sensor suffers from similar issues, the number doesn't finalize until around midnight therefore we cannot get "today's" usage. Instead we're using the utility_cost_daily()
call, this data is mostly accurate. It appears to be updated 2-3 times per day. This has the added bonus of reporting "Provided Cost".
Assumes PGE tiers up to 1,000 KWH at one price and the second price for beyond. This is typically true. Contains an attribute with a calculated total consumption this billing period. Not 100% accurate but should be close.
This integration is still WIP, I'm running it locally on a test instance of HASS, it is NOT working at the moment, as in it doesn't do anything particularly useful. I'm still working out the best way to leverage the intermittently updated data, while simultaneously learning about writing custom components.
Developed using VSCode, testing in Docker. UnitTests have not yet been written. I would like to get the development environment including docker configuration added to this repository when I've had a chance to clean it up.