Fix compatibility with new HA versions
This PR implements multiple fixes to ensure compatibility with the latest versions of Home Assistant:
-
Thread safety for DataUpdateCoordinator: Update callbacks are now always executed on the Home Assistant event loop, preventing
RuntimeError: Detected code that calls async_write_ha_state from a thread other than the event loop. Previously, this threading issue prevented new data from being received and entity updates from working. -
Correct use of async_forward_entry_setup: Platforms are now set up using
await hass.config_entries.async_forward_entry_setup(...)instead of launching them as background tasks, as required by recent Home Assistant core changes. -
Remove usage of deprecated HomeAssistantType: All type annotations now use
HomeAssistantfromhomeassistant.core, in line with the latest recommendations and deprecations.
These changes address a number of breaking changes introduced in recent and upcoming Home Assistant releases, ensuring this integration continues to work reliably.
Closes #300 (?), #302, #309, #310, partially #303, etc.
Tested and fully works. Thank you!
Any news about when a release with those changes is going to be released? The project hasn't been maintained in the last months and I'm considering if it's better just create a fork with those changes
+1 for merge - worked to fix compat issues with HA 2025.8
I'm new to home assistant and desperately tried to make this work. Can someone help me update the release I had installed with HACS with this update?
I'm new to home assistant and desperately tried to make this work. Can someone help me update the release I had installed with HACS with this update?
Use this link to add a custom repository: https://my.home-assistant.io/redirect/hacs_repository/?owner=clusterm&repository=hon&category=integration
Thank you Alexey,
Sadly it seems I can't install it for some reason
<Integration ClusterM/hon> Downloading ClusterM/hon with version a062567 failed with (Could not download, see log for details)
When I check the logs I get the same message ...
@scoofz for my part I actually applied this PRs changes manually in my custom_components/hon ... but I am using a py venv install of hass, it's probably not the best thing to do, and definitely breaks compatibility with the original hon component.
Maybe that can help. Otherwise I think you would need to uninstall the hon component first, then add the custom repo and install it through that.
Thanks, I did uninstall the previously installed hon component and it's the same thing. I won't be modifying the files for now, I'll wait for a better solution. I tried another repository the other day with a more recent PR than the last official released and I could install it, even if I still couldn't log in either, the current fix wasn't applied on that version, so I think there might be something preventing the download from Alexey's repository... But honestly I don't know jack about anything so...
@ClusterM Adding it as a custom repository results in 404 as seen in logs above. I think you need to create a release in GitHub for the latest commit, otherwise HACS cannot download the zip .
This official repo is pretty much dead and abandoned, so it's better to migrate
I have created a fork which can be added to HACS as a custom repository. It has a couple of bugs fixed. Contributions are welcome as well.
Feel free to try it out: https://github.com/mmalolepszy/hon-revived