Repository navigation
feat!: require Home Assistant 2026.11 and test with core's pytest-homeassistant - #1856
Merged
Merged
Conversation
…eassistant pytest-homeassistant-custom-component is deprecated and frozen at Home Assistant 2026.10.4, so no 2026.11 bump could resolve against it. Tests now use core's pytest-homeassistant, pinned to the Home Assistant version under test, with the integration requirements it no longer brings in. Home Assistant 2026.11 changes the config entry contract: setup, migrate and unload return None and raise on failure, and 2026.10 rejects None, so the minimum version moves to 2026.11.0. It also removes a deleted subentry's entities before notifying the entry, which made a code slot subscription send an all-empty payload for a deleted user; the removal check now reads the entry's subentries. CONN_CLASS_* is deprecated with no replacement and is dropped, and the deprecation detector follows Home Assistant's reworded messages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Entire-Checkpoint: f9618439d905
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1856 +/- ##
==========================================
- Coverage 98.89% 98.89% -0.01%
==========================================
Files 73 73
Lines 10360 10358 -2
Branches 599 599
==========================================
- Hits 10246 10244 -2
Misses 114 114
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
1 of 5 tasks
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.
Breaking change
Lock Code Manager now requires Home Assistant 2026.11.0 or newer. HACS will not offer this release to installations on an older core. Nothing changes in how you configure or use the integration. Home Assistant 2026.11 changed how integrations report a successful setup, and 2026.10 rejects the new form, so one release can't support both.
Proposed change
This replaces #1844, which can never pass: it raises
homeassistantto 2026.11.2 but keepspytest-homeassistant-custom-component0.13.375, which pinshomeassistant==2026.10.4exactly, so the dependency install fails before any test runs.1. Test package: phacc → core's
pytest-homeassistantphacc is deprecated (2026-11-03) and will not release again. Its replacement is published from home-assistant/core's
packages/pytest-homeassistant, versioned with Home Assistant.requirements_test.txt:pytest-homeassistant==2026.11.3.pytest_homeassistant_custom_component.*topytest_homeassistant.*(74 test files, no other change in them). The plugin loads through its entry point, sopytest_pluginsis gone.aiohasupervisor(hassio),numpy,av,PyTurboJPEG(Matter now imports camera → stream), andSQLAlchemy,fnv-hash-fast,psutil-home-assistant(recorder). Versions mirror the 2026.11.3 manifests and join the Dependabothomeassistantgroup.hass_config_diris overridden tohass_tmp_config_dir, as the package's README recommends. Without it the package sharestests/testing_config, and Home Assistant wrote its default blueprints into the repository on every run.zha/zha-quirksmove to 2.4.3/2.4.1 to match 2026.11.3. build(deps-dev): bump the homeassistant group across 1 directory with 6 updates #1844'smatter-python-client1.6.0,zwave-js-server-python0.75.0 andaioesphomeapi46.30.1 are ahead of what 2026.11.3's manifests pin, so they're left out.2. Config entry methods return
None(the floor bump)2026.11 changed
async_setup_entry,async_migrate_entryandasync_unload_entryto returnNoneand raise on failure (architecture#1463). A returned bool is reported, and the report raises under test, so 916 tests errored. 2026.10 instead fails setup whenasync_setup_entryreturnsNone(did not return boolean), hencehacs.json→ 2026.11.0.A failed platform unload now raises
ConfigEntryErrorwith Home Assistant's ownunload_platforms_failedtranslation. It is raised after the strategy resource cleanup, not throughasync_unload_platforms_or_raise, so that cleanup still runs when a platform fails to unload, as before.3. Deleted user: the card got an all-empty payload first
2026.11 moved the registry cleanup for a removed subentry into
_async_update_entry, ahead of_async_save_and_notify. In 2026.10 it ran after the entry was saved and its update listener scheduled. So the user's entities now disappear whileruntime_data.configstill lists their slot, andsubscribe_code_slotsent the all-null payload (name: "", every entityNone) it was written to avoid, before theremovedevent. The existing teststest_subscribe_code_slot_says_so_when_the_user_is_deletedand..._ends_when_the_subentry_is_removedcaught it. The check now reads the entry's subentries, which are updated before the registries.4. Smaller 2026.11 fallout
CONN_CLASS_*is deprecated with no replacement, and Home Assistant doesn't readCONNECTION_CLASS, so the config flow drops it.CONN_CLASS_LOCAL_POLLuse above.Type of change
Additional information
requirements_dev.txtalone: 3675 passed, 3 skipped, 2 xfailed.🤖 Generated with Claude Code