diff --git a/homeassistant/helpers/trigger.py b/homeassistant/helpers/trigger.py index a0abbaa390c..67e9010df79 100644 --- a/homeassistant/helpers/trigger.py +++ b/homeassistant/helpers/trigger.py @@ -225,7 +225,7 @@ async def _async_get_trigger_platform( try: integration = await async_get_integration(hass, platform) except IntegrationNotFound: - raise vol.Invalid(f"Invalid platform '{platform}' specified") from None + raise vol.Invalid(f"Invalid trigger '{platform}' specified") from None try: return await integration.async_get_platform("trigger") except ImportError: diff --git a/tests/components/websocket_api/test_commands.py b/tests/components/websocket_api/test_commands.py index 9c41bb8ddd2..c1a043f915b 100644 --- a/tests/components/websocket_api/test_commands.py +++ b/tests/components/websocket_api/test_commands.py @@ -2601,7 +2601,7 @@ async def test_validate_config_works( ( "triggers", {"platform": "non_existing", "event_type": "hello"}, - "Invalid platform 'non_existing' specified", + "Invalid trigger 'non_existing' specified", ), # Raises vol.Invalid ( diff --git a/tests/helpers/test_trigger.py b/tests/helpers/test_trigger.py index 4fde2d0ee0a..77f48be170b 100644 --- a/tests/helpers/test_trigger.py +++ b/tests/helpers/test_trigger.py @@ -20,7 +20,7 @@ async def test_bad_trigger_platform(hass: HomeAssistant) -> None: """Test bad trigger platform.""" with pytest.raises(vol.Invalid) as ex: await async_validate_trigger_config(hass, [{"platform": "not_a_platform"}]) - assert "Invalid platform 'not_a_platform' specified" in str(ex) + assert "Invalid trigger 'not_a_platform' specified" in str(ex) async def test_trigger_subtype(hass: HomeAssistant) -> None: