Oklahoma Gas & Electric (OGE) Custom Integration

I wanted to view my energy consumption in home assistant and not have to log in to OGEs slow portal every time. So I made a custom integration for personal use and figured I'd share with the community

Here is the disclaimer I put in the README of the GitHub repo:

Development of this project made heavy use of AI tooling. I have been a software engineer for 10 years and have been a Senior Software Engineer for about 3 to 4 years, but this is still a personal project I built for my own Home Assistant instance because I wanted my OGE data in Home Assistant. I am sharing it in case others want their data too, but you assume all risks if you choose to use it.

When you first initialize the integration with your username and password, it grabs 90 days of data.

OGE only gives an hourly breakdown of usage. They also don't update every hour. Right now its 5PM CST but they only show me data up until 8am CST

The method used for this integration is:

  1. Curl the web portal and store the session cookies and p_auth token
  2. Use the cookies and make GET requests to their APIs they use for their front end

This integration is not extensive and there is more data that is possible to capture

For now I've decided energy usage and cost were the more important.