Skip to content

Merge master into dev: bring #242 to the pyhive 2.0 beta line - #243

Merged
KJonline merged 8 commits into
devfrom
merge/master-into-dev
Nov 22, 2026
Merged

KJonline merged 8 commits into
devfrom
merge/master-into-dev

Conversation

@KJonline

Copy link
Copy Markdown
Contributor

Summary

Merges master into dev so the pyhive 2.0 beta line gets the stable fixes from #242, while keeping dev's beta changes.

Comes in from master (#242)

  • Sync with Home Assistant core 2026.11.2: the services.py re-export and boost service registration, plus the 2026.11 API changes.
  • Home Assistant 2026.11.0 is now the minimum. The test package moves to pytest-homeassistant.
  • "Boost ends" timestamp sensors for heating and hot water.
  • Reload unloads only the platforms that were set up.
  • Reauth is offered on HiveInvalidDeviceAuthentication.
  • Battery sensors record long-term statistics.

Kept from dev

  • pyhive-integration==2.0.0b5 and the beta version in manifest.json.
  • The 2.0 errors: HiveConnectionError retries setup and HiveUnknownConfiguration starts reauth. They now sit alongside master's HiveInvalidDeviceAuthentication.
  • ruff==0.17.4.

Resolutions

File Resolution
manifest.json dev's pin and version, plus master's categories and connectivity
__init__.py all four Hive errors handled, as above
config_flow.py master's (the conflict was formatting only)
requirements_test.txt dev's ruff with master's pytest-homeassistant==2026.11.2
tests/test_init.py the HiveConnectionError and HiveUnknownConfiguration cases, removed on master, are back

One change needed for 2.0

Master's sensor calls heating.getTargetTemperature, which exists only in pyhive 1.0.x. pyhive 2.0 renamed it to get_target_temperature and ships no alias. The tests mock the library, so they don't catch this. On dev the call (and its mocks) use the 2.0 name. Adding a getTargetTemperature alias to pyhive 2.0 would also help.

Closes

These were fixed in #242. That PR merged into master, which isn't the default branch, so GitHub didn't close them. This PR closes them when it merges into dev:

Closes #223
Closes #128
Closes #207
Closes #208
Closes #224

Note for the next beta

Dev's version is still 2026.11.0b1, which is older than the stable 2026.11.0. The next beta needs 2026.11.1b1 or higher for HACS to offer it to beta testers.

Test plan

  • pytest: 94 passed on Home Assistant 2026.11.2 with pyhive-integration 2.0.0b5
  • ruff check and ruff format --check pass (ruff 0.17.4)
  • The sensor attribute and boost calls work against the real pyhive 2.0.0b5 offline session (use@file.com)
  • CI green on this PR

🤖 Generated with Claude Code

nsleigh and others added 8 commits November 8, 2026 16:00
Home Assistant 2026.11 moved boost_heating_on, boost_heating_off and
boost_hot_water out of the hive climate/water_heater platforms into
hive/services.py, registered from core's async_setup. This component
replaces the hive domain, so core's async_setup never runs and the
services are missing. Add async_setup that calls core's
async_setup_services when it exists (no-op on older versions, where the
platforms still register them), plus the matching CONFIG_SCHEMA.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix: register boost services on Home Assistant 2026.11 (2026.11.0 hotfix)
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>
Sync with core 2026.11, restore boost end times and fix reload and reauth
Brings the stable fixes from #242 into dev:
- sync with core 2026.11.2
- Home Assistant 2026.11.0 minimum and the move to pytest-homeassistant
- Boost ends sensors
- the reload, reauth and battery statistics fixes

Conflict resolutions:
- manifest.json: keep dev's pyhive-integration==2.0.0b5 pin and version.
- __init__.py: keep dev's HiveConnectionError retry and
  HiveUnknownConfiguration reauth; add master's
  HiveInvalidDeviceAuthentication reauth.
- config_flow.py: take master's.
- requirements_test.txt: dev's ruff 0.17.4 with master's
  pytest-homeassistant.
- tests/test_init.py: restore the 2.0 error cases.

pyhive 2.0 has no getTargetTemperature alias, so sensor.py uses
get_target_temperature on dev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KJonline
KJonline merged commit 0865419 into dev Nov 22, 2026
5 checks passed
@KJonline
KJonline deleted the merge/master-into-dev branch November 22, 2026 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants