fix: compatibility with current Home Assistant releases (options flow, coordinator) - #22
Merged
Merged
Conversation
- Remove deprecated explicit self.config_entry assignment in options flow (removed by HA core in 2025.12; options dialog crashed on current HA) - Pass config_entry explicitly to DataUpdateCoordinator (implicit access stopped working in HA 2025.11) - Use async_config_entry_first_refresh() for the initial refresh - Use ConfigFlowResult instead of deprecated FlowResult - Import EntityCategory from homeassistant.const, use Platform enum - Keep hashrate history dict across setup so the first sample is not lost - Remove target selector from services.yaml (handlers expect a single entity_id field; target selection passed an incompatible list) - Rewrite sensor/binary sensor tests to match the actual implementation (previously referenced non-existent AxeOSSensor class) - 35 tests passing - Add CI workflow running pytest on pushes and pull requests - Raise minimum Home Assistant version to 2024.11, bump version to 1.11.0 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Df2aQvcZsu1EsHBs4n7pDt
homeassistant pins an exact aiohttp version, so any additional aiohttp constraint makes pip's resolver fail. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Df2aQvcZsu1EsHBs4n7pDt
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Df2aQvcZsu1EsHBs4n7pDt
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
Review of the integration against current Home Assistant releases found two breaking deprecations and several smaller issues. This PR fixes them and bumps the version to 1.11.0.
Breaking on current Home Assistant (fixed)
AxeOSOptionsFlowHandlerexplicitly assignedself.config_entry, which was deprecated in HA 2024.11 and removed in HA 2025.12. Opening the "Configure" dialog failed on up-to-date installs. The handler now relies on theconfig_entryproperty provided by the base class.DataUpdateCoordinatorwithout explicitconfig_entry: implicit config entry access was deprecated and stopped working in HA 2025.11. The coordinator is now created withconfig_entry=entry, and the initial refresh usesasync_config_entry_first_refresh().Other fixes
hass.datadict was replaced after the first refresh, discarding the first history sample; the update callback could alsoKeyErrorif it ran during unload. The entry dict is now created once and updated in place.services.yamloffered atarget:selector, but the service handlers only accept a singleentity_idfield — selecting a target in the UI passed a list and failed schema validation. The target blocks are removed; the explicit entity field remains.tests/test_sensor.pyimported a non-existentAxeOSSensorclass andtests/test_binary_sensor.pyused outdated signatures. Both are rewritten to match the actual implementation (35 tests, all passing),homeassistantwas added torequirements-test.txt, and a newtest.ymlworkflow runs pytest on pushes and PRs.Modernization
FlowResult→ConfigFlowResult,EntityCategoryimported fromhomeassistant.const, platform list uses thePlatformenum.hacs.jsonraised from 2022.3.0 to 2024.11.0 (required by the options flow fix); noted in README.Versioning
manifest.jsonandhacs.jsonboth bumped to 1.11.0 (kept in sync for the version-sync workflow; minor bump because the minimum HA version changes).Test plan
pytest tests/— 35 passed locally🤖 Generated with Claude Code
https://claude.ai/code/session_01Df2aQvcZsu1EsHBs4n7pDt
Generated by Claude Code