Release 2.6.6: fix entity prefix, Vigicrues 206, rain rate sawtooth, config flow (#132, #133, #134, #135) - #136
Merged
Merged
Conversation
…config flow (issues #132-#135) - Entity prefix consistency (#134): most sensor/binary_sensor/event/river entities used _attr_suggested_object_id, which HA treats as object_id_base and prefixes with the device name ("weather_station_") instead of the configured prefix whenever has_entity_name=True. All platforms now set entity_id directly at construction, which HA honours verbatim. This also removes the ad-hoc "force entity_id back on every restart" workaround a few platforms had grown, which itself silently reverted user renames. - Vigicrues auto-detect/station picker stuck on HTTP 206 (#133): Hub'Eau's station-lookup endpoint routinely answers 206 (Partial Content), not 200, when the result set is incomplete - normal, not an error, and already accepted for the observations endpoint. Auto-detect and the config/options flow's station dropdown now accept 206 alongside 200. - Rain rate sawtooth (#132): rate was computed as the instantaneous delta since the previous ~60s poll. A single bucket-tip landing inside one poll read as a brief extreme spike (e.g. 56 mm/h) that decayed to zero before the next tip. Rate is now averaged over a 10-minute sliding window of the same rain-total history already tracked for accumulation sensors. - Config flow: optional sensor fields couldn't be cleared (#135): optional source/room sensor pickers used default=<guessed sensor>, which HA's entity picker cannot clear back to empty, blocking save whenever the guess was wrong/unavailable/wrong-type. Switched to description={"suggested_value": ...}, which still pre-fills but stays clearable. All four verified against source and covered by new/updated tests (311 passed). Version bumped to 2.6.6 in manifest.json and pyproject.toml.
The validate_dashboard_entities.py script statically greps binary_sensor.py
for f"{prefix}_..." to build its known-entity allowlist; the #134 fix
changed that to f"binary_sensor.{prefix}_..." (entity_id set directly
instead of _attr_suggested_object_id), so the regex needs updating to
match. Also applies ruff format to the optional_sources_opt field
expression from the #135 fix.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 11, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes 4 open bug reports in a single 2.6.6 patch release.
Fixed
sensor.weather_station_*instead ofsensor.{prefix}_*, breaking the pre-built dashboards. Root cause:_attr_suggested_object_idis treated by Home Assistant asobject_id_base, which gets prefixed with the device name wheneverhas_entity_name = True(used by every entity here) — it does not behave like a raw object id in that case. All platforms now setentity_iddirectly at construction time instead, which HA honours verbatim regardless ofhas_entity_name. This also let us drop the ad-hoc "rename back to the expected id on every restart" workaround a few platforms had grown, which had its own bug of silently reverting a user's manual rename on every restart.default=, which Home Assistant's entity picker cannot be cleared back to empty — a wrong/unavailable/wrong-type guess blocked saving entirely. Switched todescription={"suggested_value": ...}, which still pre-fills the same suggestion but leaves the field genuinely clearable.Notes
manifest.jsonandpyproject.toml.weather_station_prefix are not renamed automatically (would risk clobbering other user renames) — the Prefix consistency (ws_ vs weather_station_) #134 fix only affects newly created entities.Test plan
python -m pytest tests/— 311 passedpython -m ruff check— clean🤖 Generated with Claude Code