rospogrigio / localtuya

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

Use deprecated constant which will be removed in HA Core 2025.1 #1650

Open tdobrovolny opened 5 months ago

tdobrovolny commented 5 months ago

Deprecation warning in HA logs about using constants which will be removed in HA Core 2025.1

Same warning type as in #1649

logistic94 commented 5 months ago

same problem device not add for my HA

neildsb commented 5 months ago

maybe try this fork? https://github.com/xZetsubou/hass-localtuya

pickonedev commented 5 months ago

It would be great if this addon will be still maintenant... And all the issues will dissapear. If not, es, @neildsb it is right.. we can "migrate" to another addon

WIth other words, I have the same issues appeared in my log... many things will become depricated

norburban commented 4 months ago

Additional depreciation warning for lights:

WARNING (MainThread) [homeassistant.components.light] 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|19: 23> and color modes,

Reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation

garry0garry commented 4 months ago

HA 2024.2.1

Logger: homeassistant.components.climate.const
Source: helpers/deprecation.py:205
Integration: Климат (documentation, issues)
First occurred: 13 февраля 2024 г. в 22:32:16 (5 occurrences)
Last logged: 13 февраля 2024 г. в 22:32:16

CURRENT_HVAC_HEAT was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.HEATING instead, please create a bug report at https://github.com/rospogrigio/localtuya/issues
CURRENT_HVAC_IDLE was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.IDLE instead, please create a bug report at https://github.com/rospogrigio/localtuya/issues
HVAC_MODE_AUTO was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.AUTO instead, please create a bug report at https://github.com/rospogrigio/localtuya/issues
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 create a bug report at https://github.com/rospogrigio/localtuya/issues
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 create a bug report at https://github.com/rospogrigio/localtuya/issues
Beer17HWAM commented 4 months ago

Same here: 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 create a bug report at https://github.com/rospogrigio/localtuya/issues 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 create a bug report at https://github.com/rospogrigio/localtuya/issues 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 create a bug report at https://github.com/rospogrigio/localtuya/issues 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 create a bug report at https://github.com/rospogrigio/localtuya/issues 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 create a bug report at https://github.com/rospogrigio/localtuya/issues 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 create a bug report at https://github.com/rospogrigio/localtuya/issues 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 create a bug report at https://github.com/rospogrigio/localtuya/issues 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 create a bug report at https://github.com/rospogrigio/localtuya/issues 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 create a bug report at https://github.com/rospogrigio/localtuya/issues 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 create a bug report at https://github.com/rospogrigio/localtuya/issues 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 create a bug report at https://github.com/rospogrigio/localtuya/issues 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 create a bug report at https://github.com/rospogrigio/localtuya/issues 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 create a bug report at https://github.com/rospogrigio/localtuya/issues 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 create a bug report at https://github.com/rospogrigio/localtuya/issues

Hooch76 commented 4 months ago

Here's another one:

WARNING (MainThread) [homeassistant.components.light] 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|3: 7> 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
pickonedev commented 4 months ago

I think this addon have left without maintenance...

If @rospogrigio will not answer here and do something about it, we can very easy go and find another fork...

@neildsb has already recommended one good working fork. By the way, if I change to the other fork, I need to add all the devices from the beginning, or it will get them from the database, from this old addon? How is the migration?

neildsb commented 4 months ago

@pickonedev its all good check out - https://github.com/xZetsubou/hass-localtuya/discussions/79

rospogrigio commented 4 months ago

Sorry guys, I have fixed some of these but these still need to be addressed. It is only a warning though so it does not impact the functionality, please just ignore them for the time being. Thank you

egore261282 commented 4 months ago

Извините, ребята, я исправил некоторые из них, но они все еще нуждаются в решении. Это всего лишь предупреждение, поэтому оно не влияет на функциональность, пожалуйста, просто игнорируйте их до поры до времени. Спасибо

у меня уже 1 сенсор недоступен, удалил и попробовал добавить снова но это не помогло, еще пару сенсоров немогут передать свое состояние image

DeFlanko commented 4 months ago

Got one:

2024-02-28 12:39:37.319 WARNING (MainThread) [homeassistant.helpers.entity] Entity None (<class 'custom_components.localtuya.fan.LocaltuyaFan'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <FanEntityFeature.SET_SPEED|DIRECTION: 5>, 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
wsw70 commented 2 months ago

The (rather impressive) list I have with 2024.4

2024-04-08 15:49:29.192 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] CURRENT_HVAC_HEAT was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.HEATING instead, please report it to the author of the 'localtuya' custom integration
2024-04-08 15:49:29.194 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] CURRENT_HVAC_IDLE was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACAction.IDLE instead, please report it to the author of the 'localtuya' custom integration
2024-04-08 15:49:29.198 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] HVAC_MODE_AUTO was used from localtuya, this is a deprecated constant which will be removed in HA Core 2025.1. Use HVACMode.AUTO instead, please report it to the author of the 'localtuya' custom integration
2024-04-08 15:49:29.200 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] 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
2024-04-08 15:49:29.203 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] 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
2024-04-08 15:49:29.205 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] 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
2024-04-08 15:49:29.208 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] 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
2024-04-08 15:49:29.209 WARNING (ImportExecutor_0) [homeassistant.components.climate.const] 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
2024-04-08 15:49:29.211 WARNING (ImportExecutor_0) [homeassistant.const] 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
2024-04-08 15:49:29.213 WARNING (ImportExecutor_0) [homeassistant.const] 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
2024-04-08 15:49:29.217 WARNING (ImportExecutor_0) [homeassistant.components.cover] 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
2024-04-08 15:49:29.219 WARNING (ImportExecutor_0) [homeassistant.components.cover] 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
2024-04-08 15:49:29.221 WARNING (ImportExecutor_0) [homeassistant.components.cover] 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
2024-04-08 15:49:29.223 WARNING (ImportExecutor_0) [homeassistant.components.cover] 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
2024-04-08 15:49:29.225 WARNING (ImportExecutor_0) [homeassistant.components.cover] 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
2024-04-08 15:49:29.228 WARNING (ImportExecutor_0) [homeassistant.components.cover] 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
2024-04-08 15:49:29.230 WARNING (ImportExecutor_0) [homeassistant.components.cover] 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
2024-04-08 15:49:29.232 WARNING (ImportExecutor_0) [homeassistant.components.cover] 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
2024-04-08 15:49:29.237 WARNING (ImportExecutor_0) [homeassistant.components.fan] 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
2024-04-08 15:49:29.239 WARNING (ImportExecutor_0) [homeassistant.components.fan] 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
2024-04-08 15:49:29.241 WARNING (ImportExecutor_0) [homeassistant.components.fan] 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
2024-04-08 15:49:29.243 WARNING (ImportExecutor_0) [homeassistant.components.fan] 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
2024-04-08 15:49:29.245 WARNING (ImportExecutor_0) [homeassistant.components.fan] 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
2024-04-08 15:49:29.247 WARNING (ImportExecutor_0) [homeassistant.components.fan] 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
2024-04-08 15:49:29.538 WARNING (MainThread) [homeassistant.components.light] 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
2024-04-08 15:49:29.538 WARNING (MainThread) [homeassistant.components.light] 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
2024-04-08 15:49:29.538 WARNING (MainThread) [homeassistant.components.light] 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
2024-04-08 15:49:29.538 WARNING (MainThread) [homeassistant.components.light] 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
garry0garry commented 2 months ago

Home Assistant v2024.4.3, Local Tuya v5.2.1

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

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

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

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
Shredder5262 commented 2 months ago

same problem....not my issue, but the errors in the logs are annoying AF

Shredder5262 commented 2 months ago

maybe try this fork? https://github.com/xZetsubou/hass-localtuya

Is this fork known to resolve the issues with local tuya? I have a few devices that i have had to set up all manually in local tuya.... I would VERY MUCH prefer not to do that again on a guess or a 'try and see'.

Beer17HWAM commented 2 months ago

Sorry guys, I have fixed some of these but these still need to be addressed. It is only a warning though so it does not impact the functionality, please just ignore them for the time being. Thank you

I hope you will fix this soon. Otherwise a lot of people are running away from your solution.

Shredder5262 commented 2 months ago

I requested for this int to be removed. I get tired of poor responses from devs. I understand dev work takes time, but i and many others would just like to know it's being worked on or not. Many times i've raised issues with things that just fall on def ears. It's gotten exhausting. Removal request link: https://github.com/hacs/integration/issues/3669

Furthermore, @neildsb I've run into a situation where i need to rebuild my local tuya sensors anyway so I'm going to give the link you previously posted regarding the forked repo a shot. Thanks for your recommendation.