Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated typing and fix thread safety issue #275

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

niekschoemaker
Copy link

Fixed issues with state updates, since newer home assistant versions async_write_ha_state gets blocked from other threads, so I replaced those calls with schedule_update_ha_state. And replaced the HomeAssistantType with HomeAssistant since HomeAssistantType is deprecated.

Also had some left overs from a while ago where I added the compressor frequency as a state which shows the load on the air conditioner currently.

I tested this running on my own Home Assistant setup with a few Haier Air Conditioners and this appears to fix the issues with the state not updating.

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.

1 participant