Ignore certain device trigger validation errors (#83972)
parent
ae9506d0bb
commit
774ebc760c
|
@ -68,7 +68,7 @@ async def async_validate_trigger_config(
|
|||
# Only call the dynamic validator if the relevant config entry is loaded
|
||||
registry = dr.async_get(hass)
|
||||
if not (device := registry.async_get(config[CONF_DEVICE_ID])):
|
||||
raise InvalidDeviceAutomationConfig
|
||||
return config
|
||||
|
||||
device_config_entry = None
|
||||
for entry_id in device.config_entries:
|
||||
|
@ -80,7 +80,7 @@ async def async_validate_trigger_config(
|
|||
break
|
||||
|
||||
if not device_config_entry:
|
||||
raise InvalidDeviceAutomationConfig
|
||||
return config
|
||||
|
||||
if not await hass.config_entries.async_wait_component(device_config_entry):
|
||||
return config
|
||||
|
|
|
@ -349,6 +349,7 @@ async def test_functional_device_trigger(
|
|||
assert automation_calls[0].data["some"] == "test_trigger_button_press"
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Temporarily disabled until automation validation is improved")
|
||||
async def test_validate_trigger_unknown_device(hass, aioclient_mock):
|
||||
"""Test unknown device does not return a trigger config."""
|
||||
await setup_deconz_integration(hass, aioclient_mock)
|
||||
|
|
|
@ -372,6 +372,7 @@ async def test_exception_bad_trigger(hass, mock_devices, calls, caplog):
|
|||
assert "Invalid config for [automation]" in caplog.text
|
||||
|
||||
|
||||
@pytest.mark.skip(reason="Temporarily disabled until automation validation is improved")
|
||||
async def test_exception_no_device(hass, mock_devices, calls, caplog):
|
||||
"""Test for exception on event triggers firing."""
|
||||
|
||||
|
|
Loading…
Reference in New Issue