Repository navigation
Sync with core 2026.11, restore boost end times and fix reload and reauth - #242
Merged
Merged
Conversation
Update the compatibility workflow to use Home Assistant’s pytest-homeassistant package, whose version matches the HA release, and update resolver outputs and maintenance guidance accordingly. Sync the Hive integration with newer core APIs, including service setup, config-entry lifecycle methods, device registry connections, and config-flow typing and error handling. Document related-repository guidance, the minimum supported HA version
Use the current device list to unload only platforms set up for the entry, avoiding reload warnings while picking up newly reported device types. Mark battery sensors as measurements to enable long-term statistics, and add reload and sensor coverage.
When the refresh token expires and this Home Assistant isn't registered for Hive device login, pyhive raises HiveInvalidDeviceAuthentication. Setup only caught HiveReauthRequired, so the entry failed without offering reauth and users had to delete and re-add the integration. Treat both as ConfigEntryAuthFailed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KJonline
marked this pull request as ready for review
November 22, 2026 00:11
3 of 4 tasks
KJonline
added a commit
that referenced
this pull request
Nov 22, 2026
Merge master into dev: bring #242 to the pyhive 2.0 beta line
nsleigh
added a commit
to nsleigh/Hive-Custom-Component
that referenced
this pull request
Nov 22, 2026
Brings in Pyhass#242 (core 2026.11 sync, boost-ends sensors, unload only configured platforms, reauth on HiveInvalidDeviceAuthentication, battery state_class) while keeping the vendored apyhiveapi, holiday mode and cold-boot retry. - __init__.py: use upstream's services.py re-export and _platforms_with_devices; keep HiveUnknownConfiguration/HiveConnectionError -> ConfigEntryNotReady (now as messages, no _LOGGER) and holiday services. - sensor.py: add HiveBoostEndSensorEntity using the vendored snake_case getters (get_boost_status/get_boost_time/get_boost, get_target_temperature); keep holiday sensors. - manifest.json: keep vendored requirements/loggers/version. - icons.json: upstream plus holiday service icons. - translations/en.json: regenerated from strings.json (adds holiday services). - tests: mock the vendored snake_case getters and exceptions; no hub id by default so holiday sensors stay out of upstream's sensor tests. 92 passed on pytest-homeassistant 2026.11.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Brings the component in line with Home Assistant core's hive integration as of 2026.11.2, makes 2026.11.0 the minimum supported Home Assistant version, and fixes several open issues.
Fixes and enhancements
binary_sensorentities, so nothing is duplicated.HiveInvalidDeviceAuthenticationnow starts the reauth flow, asHiveReauthRequiredalready did, so users no longer have to delete and re-add the integration.state_class: measurement).getTargetTemperatureand are skipped when either value isn't numeric.Sync with core 2026.11.2
services.pyre-export.async_setupregisters core's boost services itself, because core's ownasync_setupnever runs when this component replaces thehivedomain.__init__.pyfollows core's 2026.11 API changes:async_setup_entry -> None,async_unload_platforms_or_raise,dr.AnyDeviceEntry, and the hub's MAC address in device connections.config_flow.py: core's reauth error handling foris_device_registered, plus its debug logs. Our 2FA debug, device registration and options flow are kept.services.yaml,icons.jsonandtranslations/en.jsonare refreshed. The.github/core_sync.jsonfile records the synced core version for the new/sync-with-coreskill.Minimum Home Assistant 2026.11.0
hacs.jsonnow requires Home Assistant 2026.11.0, plus a best-practice cleanup.manifest.jsongainscategoriesandconnectivity.pytest-homeassistant-custom-componenttopytest-homeassistant(versioned with Home Assistant, pinned at 2026.11.2). CI, the Compatibility workflow,script/setupand the docs are updated to match.Closes
Closes #223
Closes #128
Closes #207
Closes #208
Closes #224
#235 (fixed by #239 in 2026.11.0) and #110 (
state_classwas already on the temperature sensors) are already resolved and will be closed separately.Behaviour changes for users
sensor.<zone>_heating_boost_endsandsensor.<name>_hotwater_boost_ends.Upstream
The reload, reauth and battery
state_classfixes would also help core's hive integration (home-assistant/core).Test plan
script/test: 92 passed on Home Assistant 2026.11.2script/lint --checkpasses🤖 Generated with Claude Code