Skip to content

Add API.get_rate_plan to fetch the location's current rate plan - #480

Merged
ic-dev21 merged 1 commit into
dvd-dev:mainfrom
nlz242:feature/get_rate_from_hilo
Oct 29, 2026
Merged

ic-dev21 merged 1 commit into
dvd-dev:mainfrom
nlz242:feature/get_rate_from_hilo

Conversation

@nlz242

@nlz242 nlz242 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Why

Consumers currently have to ask the user which rate plan they are on.
The Automation API already exposes it: GET /Automation/v1/api/Locations/{id}
returns ratePlan.current (e.g. Flex, D, CH) along with the rate history.

The Clientele UserInfo.electricityRate field is not usable for this: it is
hardcoded to Hilo server-side.

What

  • Add API.get_rate_plan(location_id) -> str returning ratePlan.current.

Testing

  • ruff check / ruff format --check clean.
  • Verified against a real Flex account: returns "Flex".

@ic-dev21
ic-dev21 merged commit 259d293 into dvd-dev:main Oct 29, 2026
3 checks passed
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.

2 participants