Repository navigation
Conversation
HA 2026.9 removed the module-level helper. The public API for removing a storage store is now . The previous code raised: AttributeError: module 'homeassistant.helpers.storage' has no attribute 'async_remove_store' This was triggered whenever a user removed the integration (calling ). The crash prevented clean uninstall/reinstall cycles, leaving stale storage behind. The fix tries the new API first and falls back to the legacy helper for older HA versions that don't have the instance method yet, keeping the integration compatible across releases. Refs: OpenEPaperLink#356
nlimper
pushed a commit
to nlimper/OpenEPaperLink-HA-integration
that referenced
this pull request
Oct 8, 2026
HA 2026.9 removed the module-level helper. The public API for removing a storage store is now . The previous code raised: AttributeError: module 'homeassistant.helpers.storage' has no attribute 'async_remove_store' This was triggered whenever a user removed the integration (calling ). The crash prevented clean uninstall/reinstall cycles, leaving stale storage behind. The fix tries the new API first and falls back to the legacy helper for older HA versions that don't have the instance method yet, keeping the integration compatible across releases. Refs: OpenEPaperLink#356 (cherry picked from commit 26d0e92) Source: upstream PR OpenEPaperLink#357 by @pgress, fixes OpenEPaperLink#358. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nlimper
added a commit
to nlimper/OpenEPaperLink-HA-integration
that referenced
this pull request
Oct 8, 2026
Store.async_remove() exists since at least HA 2023.3 (the minimum version in hacs.json), and a module-level storage.async_remove_store doesn't exist in 2023.3 either, so the AttributeError fallback from 0d96d6c (upstream PR OpenEPaperLink#357 by @pgress) can never work. Also removes that PR's tests: they replicate the call instead of running the integration code, and the second one only covered the fallback. 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
Fixes the
AttributeError: module 'homeassistant.helpers.storage' has no attribute 'async_remove_store'error that occurs on Home Assistant 2026.9+ when removing the integration.HA 2026.9 removed the module-level
storage.async_remove_storehelper. The public API for removing a storage store is nowStore(...).async_remove(). The previous code inasync_remove_storage_files(__init__.py:593) called the removed helper unconditionally, crashing whenever a user uninstalled the integration and preventing clean reinstall cycles.Fixes #358.
Motivation
Observed in the wild on HA
core-2026.9.4with OEPL integration v3.0.0:Reported in #358. The crash happens during
async_remove_storage_files, which is called fromasync_remove_entrywhenever the integration is completely removed from Home Assistant.Change
Replace the unconditional call to
storage.async_remove_store(hass, "open_epaper_link_tagtypes")with a version-aware approach:Store(hass, version=1, key="open_epaper_link_tagtypes").async_remove()first — this is the public API on HA 2026.9+.AttributeError, fall back to the legacystorage.async_remove_store(...)helper for older HA versions that don't exposeStore.async_removeyet.This keeps the integration compatible across HA releases without requiring a hard version bump.
Testing
homeassistant.helpers.storage.Store.async_removeexists andstorage.async_remove_storedoes NOT exist on HA 2026.9 (confirmed viapython -c "from homeassistant.helpers.storage import Store; ...").tests/test_storage_remove_compat.pycovering both branches:test_async_remove_storage_files_no_longer_crashes_on_modern_ha— assertsStore.async_removeis awaited and noAttributeErrorreaches the caller on HA 2026.9+.test_async_remove_storage_files_legacy_fallback_compat— injects a fake legacy helper and forcesStore.async_removeto raiseAttributeError, asserting the fallback path invokesstorage.async_remove_storeonce.core-2026.9.4instance by deploying the patched__init__.pyto/config/custom_components/open_epaper_link/, reloading the integration (disable → enable), and confirming theasync_remove_storeerror no longer appears in the system log on subsequent remove/re-add cycles.Scope
This PR only fixes the
async_remove_storecrash. It does NOT address the separate WebSocket-connection issue described in #356 (AP-status sensors stayingunknownbecause the WebSocket to the AP never establishes). That is a distinct problem and warrants a separate investigation/PR.Checklist
pytestpasses for the new test file.Fixes #358