Skip to content

Rename two Station attributes to match the others - #1577

Merged
frenck merged 1 commit into
mainfrom
frenck/rename-station-fields
Oct 1, 2026
Merged

frenck merged 1 commit into
mainfrom
frenck/rename-station-fields

Conversation

@frenck

@frenck frenck commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Breaking change

Two Station attributes are renamed:

  • lastchange_time is now last_change_time
  • lastcheckok is now last_check_ok

Parsing API responses is unchanged, the API keys map to the new names through aliases. Station.to_dict() uses the new names as keys. Home Assistant does not use either attribute.

Proposed change

Found in a second review of the library. Most Station attributes use snake_case with words split (last_check_time, last_check_ok_time, click_count), but these two did not. That made them easy to get wrong, like reaching for station.last_check_ok next to station.last_check_ok_time. This brings them in line.

Type of change

  • Dependency or tooling upgrade
  • Bugfix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Deprecation (replaces or removes a feature, with a migration path)
  • Breaking change (a fix or feature that changes existing behavior)
  • Code quality, refactor, or test-only change
  • Documentation only

Additional information

  • This PR fixes or closes issue: fixes # None
  • This PR is related to: None
  • Link to a separate documentation pull request: None

Checklist

  • I fully understand the code in this pull request and can explain every line, including any AI-assisted changes.
  • The change is covered by tests, and poetry run pytest passes locally. A pull request cannot be merged unless CI is green.
  • poetry run prek run --all-files passes (lint, format, and type checks).
  • No commented-out or dead code is left in the pull request.

lastchange_time becomes last_change_time and lastcheckok becomes
last_check_ok, in line with last_check_time and last_check_ok_time.
@frenck frenck added the breaking-change A breaking change for existing users. label Oct 1, 2026
@frenck
frenck merged commit 9b400d1 into main Oct 1, 2026
31 checks passed
@frenck frenck mentioned this pull request Oct 1, 2026
4 of 11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change A breaking change for existing users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant