Fix template sensor test relying on event bus debug logging (#113842)

pull/113835/head^2
J. Nick Koston 2024-03-19 10:44:04 -10:00 committed by GitHub
parent 879e5bc961
commit 6b5518b2bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -476,7 +476,11 @@ async def test_invalid_attribute_template(
await hass.async_block_till_done()
await async_update_entity(hass, "sensor.invalid_template")
assert "TemplateError" in caplog_setup_text
assert "test_attribute" in caplog.text
assert (
"Template variable error: 'None' has no attribute 'attributes' when rendering"
in caplog.text
)
assert hass.states.get("sensor.invalid_template").state == "startup"
@pytest.mark.parametrize(("count", "domain"), [(1, sensor.DOMAIN)])