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

fix: Optimize state updates and ensure ON_OFF feature support for HVACMode.OFF #84

Closed
wants to merge 1 commit into from

Conversation

sayam93
Copy link

@sayam93 sayam93 commented Dec 14, 2024

Code optimizations to prevent redundant state updates by updating entity attributes only when actual changes occur, reducing unnecessary state writes. It separates internal updates of entity attributes from those directly changed by users or automations. Previously, it was possible that the climate entities would not restore state properly on Home Assistant restarts

This further resolves a warning related in Home Assistant related to entities that implement HVACMode.OFF but do not explicitly declare the ClimateEntityFeature.ON_OFF feature. To ensure compatibility across Home Assistant versions, it dynamically adds the ON_OFF feature if available or defines a custom fallback when necessary.

Fixes #61 #76 and #79

…CMode.OFF

Code optimizations to prevent redundant state updates by updating entity attributes only when actual changes occur, reducing unnecessary state writes. It separates internal updates of entity attributes from those directly changed by users or automations. Previously, it was possible that the climate entities would not restore state properly on Home Assistant restarts

This further resolves a warning related in Home Assistant related to entities that implement HVACMode.OFF but do not explicitly declare the ClimateEntityFeature.ON_OFF feature. To ensure compatibility across Home Assistant versions, it dynamically adds the ON_OFF feature if available or defines a custom fallback when necessary.
@sayam93
Copy link
Author

sayam93 commented Dec 14, 2024

@jcwillox could you kindly take a look? It resolves a few bugs and closes existing issues for this integration.

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.

turn_on/turn_off methods without setting the proper ClimateEntityFeature
1 participant