diff --git a/homeassistant/components/lock/__init__.py b/homeassistant/components/lock/__init__.py index 9363d388637..39d5d3c350d 100644 --- a/homeassistant/components/lock/__init__.py +++ b/homeassistant/components/lock/__init__.py @@ -285,12 +285,7 @@ class LockEntity(Entity, cached_properties=CACHED_PROPERTIES_WITH_ATTR_): @cached_property def supported_features(self) -> LockEntityFeature: """Return the list of supported features.""" - features = self._attr_supported_features - if type(features) is int: # noqa: E721 - new_features = LockEntityFeature(features) - self._report_deprecated_supported_features_values(new_features) - return new_features - return features + return self._attr_supported_features async def async_internal_added_to_hass(self) -> None: """Call when the sensor entity is added to hass.""" diff --git a/tests/components/lock/test_init.py b/tests/components/lock/test_init.py index a1fed9fe7e1..68af8c7d482 100644 --- a/tests/components/lock/test_init.py +++ b/tests/components/lock/test_init.py @@ -417,20 +417,3 @@ def test_deprecated_constants( import_and_test_deprecated_constant_enum( caplog, lock, enum, constant_prefix, remove_in_version ) - - -def test_deprecated_supported_features_ints(caplog: pytest.LogCaptureFixture) -> None: - """Test deprecated supported features ints.""" - - class MockLockEntity(lock.LockEntity): - _attr_supported_features = 1 - - entity = MockLockEntity() - assert entity.supported_features is lock.LockEntityFeature(1) - assert "MockLockEntity" in caplog.text - assert "is using deprecated supported features values" in caplog.text - assert "Instead it should use" in caplog.text - assert "LockEntityFeature.OPEN" in caplog.text - caplog.clear() - assert entity.supported_features is lock.LockEntityFeature(1) - assert "is using deprecated supported features values" not in caplog.text