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 explicitly add ON_OFF feature support for HVACMode.OFF entities #82

Closed
wants to merge 2 commits into from

Conversation

sayam93
Copy link
Contributor

@sayam93 sayam93 commented Dec 11, 2024

Code optimisation to only update the state when there's an actual change in the entity's attributes, reducing redundant state writes. Before this, it was possible for the climate entities to not restore state properly on Home Assistant restarts

This also resolves a warning in Home Assistant related to entities that implement HVACMode.OFF but do not explicitly declare the ClimateEntityFeature.ON_OFF feature. It ensures compatibility across different Home Assistant versions by dynamically adding the ON_OFF feature when applicable or defining a custom fallback.

Resolves a warning related to entities implementing HVACMode.OFF without explicitly declaring the ClimateEntityFeature.ON_OFF feature. Fixes #76
@sayam93 sayam93 changed the title fix: Add ON_OFF feature support for entities with HVACMode.OFF fix: Explicitly add ON_OFF feature support for entities with HVACMode.OFF Dec 11, 2024
Code optimisation to only update the state when there's an actual change in the entity's attributes, reducing redundant state writes.
@sayam93 sayam93 changed the title fix: Explicitly add ON_OFF feature support for entities with HVACMode.OFF fix: Code optimisation to update the state only when there's an actual change and explicitly add ON_OFF feature support for entities with HVACMode.OFF Dec 11, 2024
@sayam93 sayam93 changed the title fix: Code optimisation to update the state only when there's an actual change and explicitly add ON_OFF feature support for entities with HVACMode.OFF fix: Optimize state updates and explicitly add ON_OFF feature support for HVACMode.OFF entities Dec 11, 2024
@sayam93 sayam93 closed this Dec 14, 2024
@sayam93 sayam93 deleted the patch-1 branch December 14, 2024 10:20
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