localtuya icon indicating copy to clipboard operation
localtuya copied to clipboard

Fix warnings in climate

Open vmartinv opened this issue 11 months ago • 0 comments

I'm receiving these warnings on deprecated features in home assistant. Better to fix them before climate breaks completely. The solution is quite simple, after this PR I'm getting zero warnings.

Here's the docs I could find about the problem: https://developers.home-assistant.io/blog/2024/01/24/climate-climateentityfeatures-expanded/

2024-03-09 10:34:00.770 WARNING (MainThread) [homeassistant.helpers.entity] Entity None (<class 'custom_components.localtuya.climate.LocaltuyaClimate'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <ClimateEntityFeature.TARGET_TEMPERATURE: 1>, please create a bug report at https://github.com/rospogrigio/localtuya/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
2024-03-09 10:34:00.770 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.localtuya.climate.LocaltuyaClimate'>) does not set ClimateEntityFeature.TURN_OFF but implements the turn_off method. Please create a bug report at https://github.com/rospogrigio/localtuya/issues
2024-03-09 10:34:00.771 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.localtuya.climate.LocaltuyaClimate'>) does not set ClimateEntityFeature.TURN_ON but implements the turn_on method. Please create a bug report at https://github.com/rospogrigio/localtuya/issues
2024-03-09 10:34:00.771 WARNING (MainThread) [homeassistant.components.climate] Entity None (<class 'custom_components.localtuya.climate.LocaltuyaClimate'>) implements HVACMode(s): heat, auto, off and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/rospogrigio/localtuya/issues

vmartinv avatar Mar 09 '24 11:03 vmartinv