Skip to content

feat: enable gas usage data#27

Open
crash0verride11 wants to merge 8 commits into
hunterjm:mainfrom
crash0verride11:main
Open

feat: enable gas usage data#27
crash0verride11 wants to merge 8 commits into
hunterjm:mainfrom
crash0verride11:main

Conversation

@crash0verride11

Copy link
Copy Markdown
Contributor

I like to commit the features I spent time deciphering the API for and also want to throw my hat in the ring that noon is the true and only answer for when to log data!, so opening my own competing pull. At start and end of day some data is theoretically skewer 23 hours at noon the most it is skewed is 12 hours.

Interval / period for gas usage

Recent discussion made me go back to the Duke Energy app and see how it gates whether or not to show the hourly usage / 'yesterday' pane. The actual app code gates this at the UI level (looking through a decompiled android APK), so I'm now pretty confident that the Duke Energy app API only checks DAILY for gas meters, If not the next most likely option is it's gated by region and users will chime in, but the app code, again, indicated this isn't true. As a result I don't think a configuration step is warranted after all.

Changes

  • Add gas to SUPPORTED_METER_TYPES
  • Added a serviceType check in get_energy usage to set interval and period
  • Converted get_energy_usage return to a tuple to pass to the interval for statistics entry
  • set statistics sum to day based on interval
  • if interval is DAILY add a time delta of 12 hours to log data at noon
  • if service type is not electric then UNIT_CLASS is volume
  • adjust logging to show meter type and more generically reference usage

crash0verride11 and others added 8 commits February 9, 2026 23:32
Adds support for gas meters that report DAILY usage. Will revise to pull intervalType and periodType from Duke or have the user configure on setup.
Updated installation instructions and add Safari extension support.
roll back readme for cleaner pull
* add gas to supported meter types
* added tuple to pass interval to statistics entry and switched serviceType statistic check to be interval based (correct logic for future interval selection)
Adjust comment to reflect altered code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant