rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.92k stars 558 forks source link

Deprecation warnings #1765

Open Quickstep3 opened 2 months ago

Quickstep3 commented 2 months ago

Large number of deprecation warnings with a removal date of 2025.1 and 2025.3. As we're getting close to that worth scanning the code base for a full list of deprecations and fixing them please

Logger: homeassistant.components.climate.const Source: helpers/deprecation.py:197 integration: Climate (documentation, issues) First occurred: 18 August 2024 at 11:38:22 (8 occurrences) Last logged: 18 August 2024 at 11:38:22

HVAC_MODE_HEAT was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.HEAT instead, please report it to the author of the 'localtuya' custom integration HVAC_MODE_OFF was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.OFF instead, please report it to the author of the 'localtuya' custom integration SUPPORT_PRESET_MODE was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.PRESET_MODE instead, please report it to the author of the 'localtuya' custom integration SUPPORT_TARGET_TEMPERATURE was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE instead, please report it to the author of the 'localtuya' custom integration SUPPORT_TARGET_TEMPERATURE_RANGE was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use ClimateEntityFeature.TARGET_TEMPERATURE_RANGE instead, please report it to the author of the 'localtuya' custom integration

Version 5.2.1 HA Version 2024.8.2 on a Raspberry Pi 4 4Gb

Quickstep3 commented 2 months ago

Also Logger: homeassistant.components.light Source: components/light/init.py:1329 integration: Light (documentation, issues) First occurred: 18 August 2024 at 11:38:23 (3 occurrences) Last logged: 18 August 2024 at 11:38:23

Entity None (<class 'custom_components.localtuya.light.LocaltuyaLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature.EFFECT: 4> and color modes, 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

AND

Logger: homeassistant.components.light Source: components/light/init.py:1276 integration: Light (documentation, issues) First occurred: 18 August 2024 at 11:38:23 (3 occurrences) Last logged: 18 August 2024 at 11:38:23

None (<class 'custom_components.localtuya.light.LocaltuyaLight'>) does not set supported color modes, this will stop working in Home Assistant Core 2025.3, please create a bug report at https://github.com/rospogrigio/localtuya/issues

AND

Logger: homeassistant.components.fan Source: helpers/deprecation.py:197 integration: fan (documentation, issues) First occurred: 18 August 2024 at 11:38:22 (6 occurrences) Last logged: 18 August 2024 at 11:38:22

SUPPORT_DIRECTION was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.DIRECTION instead, please report it to the author of the 'localtuya' custom integration SUPPORT_OSCILLATE was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.OSCILLATE instead, please report it to the author of the 'localtuya' custom integration SUPPORT_SET_SPEED was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use FanEntityFeature.SET_SPEED instead, please report it to the author of the 'localtuya' custom integration

AND

Logger: homeassistant.components.cover Source: helpers/deprecation.py:197 integration: Cover (documentation, issues) First occurred: 18 August 2024 at 11:38:22 (8 occurrences) Last logged: 18 August 2024 at 11:38:22

SUPPORT_CLOSE was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use CoverEntityFeature.CLOSE instead, please report it to the author of the 'localtuya' custom integration SUPPORT_OPEN was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use CoverEntityFeature.OPEN instead, please report it to the author of the 'localtuya' custom integration SUPPORT_SET_POSITION was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use CoverEntityFeature.SET_POSITION instead, please report it to the author of the 'localtuya' custom integration SUPPORT_STOP was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use CoverEntityFeature.STOP instead, please report it to the author of the 'localtuya' custom integration

AND

Logger: homeassistant.const Source: helpers/deprecation.py:197 First occurred: 18 August 2024 at 11:38:22 (2 occurrences) Last logged: 18 August 2024 at 11:38:22

TEMP_CELSIUS was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.CELSIUS instead, please report it to the author of the 'localtuya' custom integration TEMP_FAHRENHEIT was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfTemperature.FAHRENHEIT instead, please report it to the author of the 'localtuya' custom integration

Quickstep3 commented 2 months ago

Apologies this is a duplication filing of https://github.com/rospogrigio/localtuya/issues/1650 which I did not see initially.

rosentrieb commented 2 months ago

None (<class 'custom_components.localtuya.light.LocaltuyaLight'>) does not set supported color modes, this will stop working in Home Assistant Core 2025.3