Only entity verify state writable once after success unless hass is missing (#118896)

This commit is contained in:
J. Nick Koston 2024-06-06 11:46:44 -05:00 committed by GitHub
parent ffea72f866
commit 62b1bde0e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 7 deletions

View file

@ -1662,11 +1662,6 @@ async def test_warn_no_platform(
ent.entity_id = "hello.world"
error_message = "does not have a platform"
# No warning if the entity has a platform
caplog.clear()
ent.async_write_ha_state()
assert error_message not in caplog.text
# Without a platform, it should trigger the warning
ent.platform = None
caplog.clear()
@ -1678,6 +1673,11 @@ async def test_warn_no_platform(
ent.async_write_ha_state()
assert error_message not in caplog.text
# No warning if the entity has a platform
caplog.clear()
ent.async_write_ha_state()
assert error_message not in caplog.text
async def test_invalid_state(
hass: HomeAssistant, caplog: pytest.LogCaptureFixture