Forwarders (Windy / Pocasi):
- `enabled` becomes a property reading the option live. Toggling it does not
reload the entry, so the cached copy left the diagnostics sensor reporting a
stale value indefinitely for a disabled forwarder.
- Reject empty credentials explicitly: an empty string is still a `str`, so
`checked` alone let an unconfigured forwarder send a request that could only
ever be refused.
- Use `persistent_notification.async_create` instead of the sync variant.
- Use WINDY_MAX_RETRIES consistently; add POCASI_CZ_MAX_RETRIES.
Utils:
- `voc_level_to_text` / `battery_5step_to_pct` go through `to_int` like every
other value_fn. A bare `int()` raised on a garbage payload value, which
`WeatherSensor.native_value` then logged with a full traceback on every push.
Out-of-range battery steps are clamped to a valid percentage.
- Simplify `check_disabled` (drop the redundant camelCase flag).
Config flow:
- `retain_data` re-reads SENSORS_TO_LOAD at submit time. Auto-discovery appends
to it from the webhook handler, so writing back the snapshot taken when the
step opened silently rolled back any sensor discovered meanwhile.
Coordinator:
- Drop the per-push staleness recalculation; the hourly timer already covers it.
Ecowitt:
- Tolerate aioecowitt moving/renaming the internal SENSOR_MAP rather than
failing the whole module import; unit-variant dedup degrades instead.
Translations:
- Battery state key `unknown` -> `drained`: the entity emits UnitOfBat.UNKNOWN,
whose value is "drained", so the old key never matched and the raw state
leaked into the UI. cs.json was already correct.
- Remove the dead `migration` step; `async_step_migration` does not exist.
Also: remove verified-dead constants/helpers and fix ~30 docstring typos.
After a config reload a new HealthCoordinator is created, but the sticky
/station/health route kept calling the previous (stale) instance. Add
Routes.rebind_handler() and call it from async_setup_entry's reload branch
so the endpoint always serves the current coordinator.
Also make _resolve_route() tolerant of requests without match_info/route/
resource instead of raising AttributeError.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Reuse existing `WeatherDataUpdateCoordinator` instance across reloads instead of
creating a new one; routes keep pointing to the same coordinator, so entities
stay subscribed and updates never silently drop
- `update_listener` now skips full reload when only `SENSORS_TO_LOAD` changes
(auto-discovery); avoids the "frozen UI" window caused by temporary platform unload
- Replaced direct `route._handler` mutation with a proper `Routes` dispatcher;
all aiohttp routes are registered once and an internal dispatcher decides which
handler is active — safe to switch at runtime without touching the router
- Fixed `self.config_entry` / `self.config` inconsistency in coordinator
- `BatteryBinarySensor` now carries correct `device_info` (same identifiers as
`WeatherSensor`) → single device card in UI instead of two
- Translations for binary sensors must live under `entity.binary_sensor.*`,
not `entity.sensor.*`
- Fixed all tests broken by new `register_path(hass, coordinator, coordinator_h, entry)` signature
- Updated `_RouterStub` to accept `name=` kwargs and return objects with `.method`
- Added `async post()` to `_RequestStub` stubs
- Aligned `Routes` tests with new `method:path` dispatch key format and `show_enabled()` output
- Replaced `WindyApiKeyError` with `WindyPasswordMissing` to match actual exceptions
- Updated `_FakeResponse` to use HTTP status codes instead of response text strings
- Patched `persistent_notification.create` in Windy push tests to avoid `SimpleNamespace` errors
- Integrate aioecowitt to parse incoming weather station payloads and map sensors to the SWS pipeline.
- Add a new webhook endpoint at /weatherhub/{webhook_id} with support for dynamic route resolution.
- Expand battery binary sensor definitions and implement logic for dynamic entity creation.
- Bump version to 2.0.0-pre1.
Include HTTP method in route keys and dispatch, and fix
Routes.show_enabled.
Update register_path to accept a HealthCoordinator and adjust router
stubs in tests. Update WindyPush tests to use response objects
(status/text)
and adapt related exception/notification expectations.
- Register aiohttp webhook routes once and switch the active dispatcher handler on option changes
- Make the internal route registry method-aware (GET/POST) and improve enabled-route logging
- Fix OptionsFlow initialization by passing the config entry and using safe defaults for credentials
- Harden Windy resend by validating credentials early, auto-disabling the feature on invalid responses, and notifying the user
- Update translations for Windy credential validation errors
- Add detailed architecture overview in __init__.py
- Introduce shared runtime keys in data.py to avoid key conflicts
- Implement dual route dispatcher for webhook endpoint selection
- Enhance sensor platform for dynamic sensor addition without reloads
- Rename battery level "unknown" to "drained" with updated icons
- Improve utils.py with centralized helpers for remapping and discovery
- Update translations and strings for consistency
- Add typing and runtime checks with py_typecheck for config options and
incoming data
- Enhance authentication validation and error handling in data
coordinator
- Refactor Routes class with better dispatch logic and route
enabling/disabling
- Clean up async functions and improve logging consistency
- Add type hints and annotations throughout the integration
- Update manifest to include typecheck-runtime dependency
- Keep OptionsFlow state in sync by building defaults from entry data + options
- Store the config entry on the coordinator for consistent access
- Make route registry method-aware and switch handlers by url_path with
awarness of POST/GET method.
- Fixed an issue, when on config update needs restart of HomeAssistant
to reload integration.
Refactoring webhook switching.
Added routing management to automaticly update coordinator to avoid restarting HA on configuration change or on new sensor discovery.