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

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

Open
tdobrovolny opened this issue Jan 27, 2024 · 18 comments
Open

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

tdobrovolny opened this issue Jan 27, 2024 · 18 comments

Comments

@tdobrovolny
Copy link

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

  • CURRENT_HVAC_HEAT
  • CURRENT_HVAC_IDLE
  • HVAC_MODE_AUTO
  • HVAC_MODE_HEAT
  • HVAC_MODE_OFF
  • SUPPORT_PRESET_MODE
  • SUPPORT_TARGET_TEMPERATURE
  • SUPPORT_TARGET_TEMPERATURE_RANGE
  • TEMP_CELSIUS
  • TEMP_FAHRENHEIT
  • SUPPORT_CLOSE
  • SUPPORT_OPEN
  • SUPPORT_SET_POSITION
  • SUPPORT_STOP
  • SUPPORT_DIRECTION
  • SUPPORT_OSCILLATE
  • SUPPORT_SET_SPEED

Same warning type as in #1649

@logistic94
Copy link

same problem device not add for my HA

@neildsb
Copy link

neildsb commented Jan 29, 2024

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

@pickonedev
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link

Hooch76 commented Feb 19, 2024

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
Copy link

pickonedev commented Feb 19, 2024

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
Copy link

neildsb commented Feb 19, 2024

@pickonedev its all good check out - xZetsubou#79

@rospogrigio
Copy link
Owner

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
Copy link

egore261282 commented Feb 27, 2024

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

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

@DeFlanko
Copy link

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
Copy link

wsw70 commented Apr 8, 2024

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
Copy link

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
Copy link

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

@Shredder5262
Copy link

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
Copy link

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
Copy link

Shredder5262 commented May 3, 2024

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:
hacs/integration#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests