mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 12:45:28 +02:00
Remove deprecated lock constants (#131812)
This commit is contained in:
@@ -31,7 +31,6 @@ from homeassistant.core import HomeAssistant, callback
|
|||||||
from homeassistant.exceptions import ServiceValidationError
|
from homeassistant.exceptions import ServiceValidationError
|
||||||
import homeassistant.helpers.config_validation as cv
|
import homeassistant.helpers.config_validation as cv
|
||||||
from homeassistant.helpers.deprecation import (
|
from homeassistant.helpers.deprecation import (
|
||||||
DeprecatedConstantEnum,
|
|
||||||
all_with_deprecated_constants,
|
all_with_deprecated_constants,
|
||||||
check_if_deprecated_constant,
|
check_if_deprecated_constant,
|
||||||
dir_with_deprecated_constants,
|
dir_with_deprecated_constants,
|
||||||
@@ -67,10 +66,6 @@ class LockEntityFeature(IntFlag):
|
|||||||
OPEN = 1
|
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}
|
PROP_TO_ATTR = {"changed_by": ATTR_CHANGED_BY, "code_format": ATTR_CODE_FORMAT}
|
||||||
|
|
||||||
# mypy: disallow-any-generics
|
# mypy: disallow-any-generics
|
||||||
|
@@ -405,8 +405,7 @@ def _create_tuples(
|
|||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("enum", "constant_prefix", "remove_in_version"),
|
("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(
|
def test_deprecated_constants(
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
|
Reference in New Issue
Block a user