Do not fail MQTT setup if lights configured via yaml can't be validated (#101649)

* Add light

* Deduplicate code

* Follow up comment
This commit is contained in:
Jan Bouwhuis
2023-10-19 17:34:43 +02:00
committed by GitHub
parent 90687e9794
commit d149bffb07
9 changed files with 107 additions and 166 deletions

View File

@@ -253,9 +253,8 @@ async def test_fail_setup_if_no_command_topic(
caplog: pytest.LogCaptureFixture,
) -> None:
"""Test if command fails with command topic."""
with pytest.raises(AssertionError):
await mqtt_mock_entry()
assert "Invalid config for [mqtt]: required key not provided" in caplog.text
assert await mqtt_mock_entry()
assert "required key not provided" in caplog.text
@pytest.mark.parametrize(