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

2024.1 deprecates constants and features used by Dahua #328

Closed
sure-fire opened this issue Jan 3, 2024 · 7 comments · Fixed by #337
Closed

2024.1 deprecates constants and features used by Dahua #328

sure-fire opened this issue Jan 3, 2024 · 7 comments · Fixed by #337

Comments

@sure-fire
Copy link

sure-fire commented Jan 3, 2024

I updated to 2024.1 and got the following warnings which link to this page:
Deprecating all magic numbers for supported features


Logger: homeassistant.components.camera
Source: helpers/deprecation.py:204
Integration: Camera (documentation, issues)
First occurred: 17:14:29 (2 occurrences)
Last logged: 17:14:30

SUPPORT_STREAM was used from dahua, this is a deprecated constant which will be removed in HA Core 2025.1. Use CameraEntityFeature.STREAM instead, please create a bug report at https://github.com/rroller/dahua/issues 

Logger: homeassistant.components.light
Source: components/light/__init__.py:1194
Integration: Light (documentation, issues)
First occurred: 17:14:30 (1 occurrences)
Last logged: 17:14:30

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

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:1520
First occurred: 17:14:30 (1 occurrences)
Last logged: 17:14:30

Entity camera.front_door_main (<class 'custom_components.dahua.camera.DahuaCamera'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <CameraEntityFeature.STREAM: 2>, please create a bug report at https://github.com/rroller/dahua/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
@nawwman
Copy link

nawwman commented Jan 8, 2024

also:

Logger: homeassistant.components.light
Source: components/light/__init__.py:1194
Integration: Light ([documentation](https://www.home-assistant.io/integrations/light), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+light%22))
First occurred: 20:34:28 (1 occurrences)
Last logged: 20:34:28
Entity None (<class 'custom_components.dahua.light.DahuaInfraredLight'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <LightEntityFeature: 1> and color modes, please create a bug report at https://github.com/rroller/dahua/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:1520
First occurred: 20:34:21 (9 occurrences)
Last logged: 20:34:28
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
Entity camera.dahua_vto_2202f_klingel_main (<class 'custom_components.dahua.camera.DahuaCamera'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <CameraEntityFeature.STREAM: 2>, please create a bug report at https://github.com/rroller/dahua/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation

@pollinolas
Copy link

I also have the SUPPORT_STREAM alert for a dahua doorbell VTO2202F

@TheAlphaLaw
Copy link

TheAlphaLaw commented Feb 7, 2024

Seeing the same for AD410 Doorbell:

SUPPORT_STREAM was used from dahua, this is a deprecated constant which will be removed in HA Core 2025.1. Use CameraEntityFeature.STREAM instead, please create a bug report at https://github.com/rroller/dahua/issues

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

@Masterz69
Copy link

More to fix till 2025.3:

Logger: homeassistant.components.light
Source: components/light/__init__.py:1269
integration: Light (documentation, issues)
First occurred: 14:08:27 (2 occurrences)
Last logged: 14:19:30

None (<class 'custom_components.dahua.light.DahuaInfraredLight'>) 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/rroller/dahua/issues

@thecode
Copy link
Contributor

thecode commented Mar 23, 2024

More to fix till 2025.3:

Logger: homeassistant.components.light
Source: components/light/__init__.py:1269
integration: Light (documentation, issues)
First occurred: 14:08:27 (2 occurrences)
Last logged: 14:19:30

None (<class 'custom_components.dahua.light.DahuaInfraredLight'>) 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/rroller/dahua/issues

I will push a PR to fix this also when the camera one is reviewed

@rroller
Copy link
Owner

rroller commented May 4, 2024

Sorry for the delay.

Fixed by merging adutchak's PR and released in 0.9.52
https://github.com/rroller/dahua/releases/tag/0.9.52

@rroller rroller closed this as completed May 4, 2024
@rroller
Copy link
Owner

rroller commented May 4, 2024

https://github.com/rroller/dahua/releases/tag/0.9.53 released for the constant fix thanks to thecode

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

Successfully merging a pull request may close this issue.

7 participants