Remove deprecated lock constants (#131812)

This commit is contained in:
Robert Resch 2024-11-28 12:21:13 +01:00 committed by GitHub
parent a01e7cd6cf
commit 1d09a5bf89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 7 deletions

View File

@ -31,7 +31,6 @@ from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import ServiceValidationError
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.deprecation import (
DeprecatedConstantEnum,
all_with_deprecated_constants,
check_if_deprecated_constant,
dir_with_deprecated_constants,
@ -67,10 +66,6 @@ class LockEntityFeature(IntFlag):
OPEN = 1
# The SUPPORT_OPEN constant is deprecated as of Home Assistant 2022.5.
# Please use the LockEntityFeature enum instead.
_DEPRECATED_SUPPORT_OPEN = DeprecatedConstantEnum(LockEntityFeature.OPEN, "2025.1")
PROP_TO_ATTR = {"changed_by": ATTR_CHANGED_BY, "code_format": ATTR_CODE_FORMAT}
# mypy: disallow-any-generics

View File

@ -405,8 +405,7 @@ def _create_tuples(
@pytest.mark.parametrize(
("enum", "constant_prefix", "remove_in_version"),
_create_tuples(lock.LockEntityFeature, "SUPPORT_", "2025.1")
+ _create_tuples(lock.LockState, "STATE_", "2025.10"),
_create_tuples(lock.LockState, "STATE_", "2025.10"),
)
def test_deprecated_constants(
caplog: pytest.LogCaptureFixture,