Skip to content

Commit

Permalink
Remove deprecated lock constants (home-assistant#131812)
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhaus authored Nov 28, 2024
1 parent a01e7cd commit 1d09a5b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
5 changes: 0 additions & 5 deletions homeassistant/components/lock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
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,
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions tests/components/lock/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1d09a5b

Please sign in to comment.