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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated constant for HA 2024.1 #502

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

hmmbob
Copy link

@hmmbob hmmbob commented Dec 31, 2023

Had these in my logs:

2023-12-31 14:33:19.819 WARNING (MainThread) [homeassistant.components.camera] SUPPORT_ON_OFF was used from xiaomi_cloud_map_extractor, this is a deprecated constant which will be removed in HA Core 2025.1. Use CameraEntityFeature.ON_OFF instead, please create a bug report at https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/issues
2023-12-31 14:33:19.823 WARNING (MainThread) [homeassistant.components.camera] SUPPORT_ON_OFF was used from xiaomi_cloud_map_extractor, this is a deprecated constant which will be removed in HA Core 2025.1. Use CameraEntityFeature.ON_OFF instead, please create a bug report at https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/issues
2023-12-31 14:33:24.736 WARNING (MainThread) [homeassistant.helpers.entity] Entity camera.stofzuiger (<class 'custom_components.xiaomi_cloud_map_extractor.camera.VacuumCamera'>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <CameraEntityFeature.ON_OFF: 1>, please create a bug report at https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/issues and reference https://developers.home-assistant.io/blog/2023/12/28/support-feature-magic-numbers-deprecation

It was a straight forward fix.... 馃槃 Tested locally, runs fine. CameraEntityFeature has been around since 2022.5, so this should be non-breaking for older HA versions.

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

@PiotrMachowski PiotrMachowski changed the base branch from master to dev December 31, 2023 14:11
@gieljnssns
Copy link

Why doesn't get this merged?

Copy link

@MrHollowPS MrHollowPS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. same patch i applied locally.

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 this pull request may close these issues.

None yet

3 participants