jcwillox/hass-template-climate

Home assistant 2024.2.5 warnings

Closed this issue · 9 comments

The problem

Warning in the Climate Component:
The climate component has generated a warning indicating that the script implements HVAC (Heating, Ventilation, and Air Conditioning) modes without setting the proper ClimateEntityFeature. This could cause issues when using the turn_on/turn_off methods implicitly.

Warnings in the Heating Control Script:
The script used for heating control has generated two warnings indicating that its execution requires passing a context to function correctly. This suggests that the script is not configured to receive and use the appropriate context, which could affect its behavior and performance.

What version of Template Climate has the issue?

0.6.1

What version of Home Assistant are you running?

2024.2.5

What type of installation are you running?

Home Assistant Container

Example YAML snippet

No response

Anything in the logs that might be useful for us?

WARNING (MainThread) [homeassistant.components.climate] Entity climate.calefaccion_corregida (<class 'custom_components.climate_template.climate.TemplateClimate'>) implements HVACMode(s): off, heat 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
WARNING (MainThread) [homeassistant.helpers.script.calefaccion_corregida] Calefacción corregida: Running script requires passing in a context
WARNING (MainThread) [homeassistant.helpers.script.calefaccion_corregida] Calefacción corregida: Running script requires passing in a context

Additional information

Thank you for developing this component. I truly appreciate your hard work and dedication!

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.

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.

Hi,
I tried your repo just now, still see same warnings after restart. Did I miss something?

Hello,

you should only see this:
WARNING (MainThread) [homeassistant.helpers.script.calefaccion_corregida] Calefacción corregida: Running script requires passing in a context

To my knowledge this is know HA core bug and I think I saw some github discussion about it. I will check the fix to see if it could be applied also to climate-template.

My fix is only for the first warning:

WARNING (MainThread) [homeassistant.components.climate] Entity climate.calefaccion_corregida (<class 'custom_components.climate_template.climate.TemplateClimate'>) implements HVACMode(s): off, heat 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

And this was definitely fixed - you can see it merged here: litinoveweedle#4

And as well I have no warning anymore ;-)

Ok I did checked the HA core template fix and it seems applicable to our custom integration as well. I will try to do it today later on.

You are correct, now I see only the "Running script requires passing in a context" warnings.

Please check latest release 0.6.4, other warnings are now fixed as well.

Yep, just updated.
Those are gone as well.
Log looks much cleaner now, thanks!

Yep, no problem. If you liked my repo you can star it. ;-)

🎉 This issue has been resolved in version 0.6.2 🎉

The release is available on:

Your semantic-release bot 📦🚀