Only entity verify state writable once after success unless hass is missing (#118896)
This commit is contained in:
parent
ffea72f866
commit
62b1bde0e8
2 changed files with 15 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue