From 8db416f1d6f506fca8ce31e4fa76a9eba769eec2 Mon Sep 17 00:00:00 2001 From: Ivan Puddu Date: Tue, 18 Oct 2022 22:53:34 +0200 Subject: [PATCH] Skip webostv trigger validation before the domain is setup (#80372) * Skip trigger validation before the domain is setup * Included None as return type * Keep function signature intact. Check at the source --- homeassistant/components/webostv/device_trigger.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/webostv/device_trigger.py b/homeassistant/components/webostv/device_trigger.py index 859accc86e6..ef3e74a7daa 100644 --- a/homeassistant/components/webostv/device_trigger.py +++ b/homeassistant/components/webostv/device_trigger.py @@ -46,7 +46,8 @@ async def async_validate_trigger_config( device_id = config[CONF_DEVICE_ID] try: device = async_get_device_entry_by_device_id(hass, device_id) - async_get_client_wrapper_by_device_entry(hass, device) + if DOMAIN in hass.data: + async_get_client_wrapper_by_device_entry(hass, device) except ValueError as err: raise InvalidDeviceAutomationConfig(err) from err