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

turn_on/turn_off methods without setting the proper ClimateEntityFeature #61

Open
purcell-lab opened this issue Feb 29, 2024 · 5 comments · May be fixed by #86
Open

turn_on/turn_off methods without setting the proper ClimateEntityFeature #61

purcell-lab opened this issue Feb 29, 2024 · 5 comments · May be fixed by #86

Comments

@purcell-lab
Copy link

The problem

Home Assistant 2024.3 is currently in beta and is doing some more strict checking of climate devices and has detected an issue with this integration.

What version of Template Climate has the issue?

0.6.1

What version of Home Assistant are you running?

2024.3.b1

What type of installation are you running?

Home Assistant Supervised

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.climate
Source: components/climate/__init__.py:361
integration: Climate (documentation, issues)
First occurred: 5:30:03 AM (3 occurrences)
Last logged: 5:32:51 AM

Entity climate.climate_master (<class 'custom_components.climate_template.climate.TemplateClimate'>) implements HVACMode(s): auto, off, cool, heat, dry, fan_only and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/jcwillox/hass-template-climate/issues

Additional information

No response

@litinoveweedle
Copy link

Hello,

if you like, you can use my forked repo, where I am merging multiple feature request with some of my own patches. ;-) The above error is patched there.

@SiriosDev
Copy link

just create a pr to this repo

@litinoveweedle
Copy link

Why should I? I am happy to maintain my fork, which has now more features, some of those were long PR in this repo but were never merged. There has to be two to dance. So thank you, but no thank you.

@SiriosDev
Copy link

Dunno, (for me) it doesn't seem the most elegant thing in the world to me to fork without even trying a merge, when the original repo is still maintained.

That doesn't mean I won't switch to your version which seems better. You seem sure you don't want to merge, which is the second most important thing after functions (not having to switch back, in a word stability)

@sayam93
Copy link

sayam93 commented Dec 14, 2024

Dunno, (for me) it doesn't seem the most elegant thing in the world to me to fork without even trying a merge, when the original repo is still maintained.

That doesn't mean I won't switch to your version which seems better. You seem sure you don't want to merge, which is the second most important thing after functions (not having to switch back, in a word stability)

I've created a PR to address this #85

Hopefully it gets reviewed and merged soon.

sayam93 added a commit to sayam93/hass-template-climate that referenced this issue Dec 18, 2024
…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 only if HVACMode.OFF exists for the templated entity.

Fixes jcwillox#61 jcwillox#76 and jcwillox#79
sayam93 added a commit to sayam93/hass-template-climate that referenced this issue Dec 24, 2024
…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 only if HVACMode.OFF exists for the templated entity.

Fixes jcwillox#61 jcwillox#76 and jcwillox#79

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