Skip to content

Conversation

@ClusterM
Copy link

@ClusterM ClusterM commented Jul 17, 2025

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 HomeAssistant from homeassistant.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.

@devhartley
Copy link

Tested and fully works. Thank you!

@pautena
Copy link

pautena commented Jul 22, 2025

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

UnAfraid added a commit to UnAfraid/hon that referenced this pull request Aug 22, 2025
@evias
Copy link

evias commented Aug 26, 2025

+1 for merge - worked to fix compat issues with HA 2025.8

@scoofz
Copy link

scoofz commented Sep 14, 2025

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?

@ClusterM
Copy link
Author

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

@scoofz
Copy link

scoofz commented Sep 17, 2025

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 ...

@evias
Copy link

evias commented Sep 17, 2025

@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.

@scoofz
Copy link

scoofz commented Sep 17, 2025

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...

@pokonski
Copy link

pokonski commented Oct 7, 2025

Screenshot 2025-10-07 at 11 50 46

@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

@mmalolepszy
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

h0n entities are not refreshing properly

8 participants