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

Constant deprecation in HA 2024.1 #1484

Closed
elarsson1 opened this issue Jan 6, 2024 · 1 comment
Closed

Constant deprecation in HA 2024.1 #1484

elarsson1 opened this issue Jan 6, 2024 · 1 comment

Comments

@elarsson1
Copy link

Describe the bug
Home Assistant 2024.1 has deprecated a number of constants which have been replaced by enum types. Starting in HA 2024.1, this will emit log messages for use of deprecated constants in 2024.1. These constants will be removed completely in 2025.1.

Reference:

To Reproduce
Issue is reproduced on any Home Assistant build > 2024.1

Expected behavior
Integration starts with no warnings in log.

Sample Log messages
Entity None (<class 'custom_components.tuya_local.light.TuyaLocalLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 0> and color modes, please create a bug report at https://github.com/make-all/tuya-local/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation

@elarsson1 elarsson1 added the bug Something isn't working label Jan 6, 2024
@make-all make-all added maintenance Changes to keep up with HA development and removed bug Something isn't working labels Jan 7, 2024
@make-all
Copy link
Owner

make-all commented Jan 7, 2024

It seems only the 0 values are an issue, as there is not any value defined for them in the enums.

@make-all make-all added awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release labels Jan 7, 2024
make-all added a commit that referenced this issue Jan 7, 2024
HA 2024.1 has deprecated the use of old constants, but even 0 (which
does not have a constant, nor an enum value to assign) is caught up in
this.

Workaround this by casting 0 to the enum type.

Issue #1484
@make-all make-all removed awaiting confirmation Wating for confirmation the issue is solved unreleased Will be in next release maintenance Changes to keep up with HA development labels Jan 8, 2024
@make-all make-all closed this as completed Jan 8, 2024
timlaing pushed a commit to timlaing/tuya-local that referenced this issue Aug 8, 2024
HA 2024.1 has deprecated the use of old constants, but even 0 (which
does not have a constant, nor an enum value to assign) is caught up in
this.

Workaround this by casting 0 to the enum type.

Issue make-all#1484
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants