diff --git a/homeassistant/components/remote/__init__.py b/homeassistant/components/remote/__init__.py index 6a007bde0b447d0bcab8454f21f0063cdffe2d71..9c54a40be70436b4770991ea9347ddeef6299bc5 100644 --- a/homeassistant/components/remote/__init__.py +++ b/homeassistant/components/remote/__init__.py @@ -22,12 +22,6 @@ from homeassistant.const import ( ) from homeassistant.core import HomeAssistant from homeassistant.helpers import config_validation as cv -from homeassistant.helpers.deprecation import ( - DeprecatedConstantEnum, - all_with_deprecated_constants, - check_if_deprecated_constant, - dir_with_deprecated_constants, -) from homeassistant.helpers.entity import ToggleEntity, ToggleEntityDescription from homeassistant.helpers.entity_component import EntityComponent from homeassistant.helpers.typing import ConfigType @@ -74,19 +68,6 @@ class RemoteEntityFeature(IntFlag): ACTIVITY = 4 -# These SUPPORT_* constants are deprecated as of Home Assistant 2022.5. -# Please use the RemoteEntityFeature enum instead. -_DEPRECATED_SUPPORT_LEARN_COMMAND = DeprecatedConstantEnum( - RemoteEntityFeature.LEARN_COMMAND, "2025.1" -) -_DEPRECATED_SUPPORT_DELETE_COMMAND = DeprecatedConstantEnum( - RemoteEntityFeature.DELETE_COMMAND, "2025.1" -) -_DEPRECATED_SUPPORT_ACTIVITY = DeprecatedConstantEnum( - RemoteEntityFeature.ACTIVITY, "2025.1" -) - - REMOTE_SERVICE_ACTIVITY_SCHEMA = cv.make_entity_service_schema( {vol.Optional(ATTR_ACTIVITY): cv.string} ) @@ -251,11 +232,3 @@ class RemoteEntity(ToggleEntity, cached_properties=CACHED_PROPERTIES_WITH_ATTR_) await self.hass.async_add_executor_job( ft.partial(self.delete_command, **kwargs) ) - - -# These can be removed if no deprecated constant are in this module anymore -__getattr__ = ft.partial(check_if_deprecated_constant, module_globals=globals()) -__dir__ = ft.partial( - dir_with_deprecated_constants, module_globals_keys=[*globals().keys()] -) -__all__ = all_with_deprecated_constants(globals()) diff --git a/tests/components/remote/test_init.py b/tests/components/remote/test_init.py index 575e69015fec6873a245c4fcdfd4098566c13a04..272197889065f550c803457bc69a328c651ac37d 100644 --- a/tests/components/remote/test_init.py +++ b/tests/components/remote/test_init.py @@ -23,11 +23,7 @@ from homeassistant.const import ( ) from homeassistant.core import HomeAssistant -from tests.common import ( - async_mock_service, - help_test_all, - import_and_test_deprecated_constant_enum, -) +from tests.common import async_mock_service TEST_PLATFORM = {DOMAIN: {CONF_PLATFORM: "test"}} SERVICE_SEND_COMMAND = "send_command" @@ -148,20 +144,6 @@ async def test_delete_command(hass: HomeAssistant) -> None: assert call.data[ATTR_ENTITY_ID] == ENTITY_ID -def test_all() -> None: - """Test module.__all__ is correctly set.""" - help_test_all(remote) - - -@pytest.mark.parametrize(("enum"), list(remote.RemoteEntityFeature)) -def test_deprecated_constants( - caplog: pytest.LogCaptureFixture, - enum: remote.RemoteEntityFeature, -) -> None: - """Test deprecated constants.""" - import_and_test_deprecated_constant_enum(caplog, remote, enum, "SUPPORT_", "2025.1") - - def test_deprecated_supported_features_ints(caplog: pytest.LogCaptureFixture) -> None: """Test deprecated supported features ints."""