Add error message to snapshot_platform helper (#117974)

pull/117975/head
epenet 2024-05-24 10:38:23 +02:00 committed by GitHub
parent 488b2edfd8
commit bb0b01e4a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -1757,5 +1757,6 @@ async def snapshot_platform(
for entity_entry in entity_entries:
assert entity_entry == snapshot(name=f"{entity_entry.entity_id}-entry")
assert entity_entry.disabled_by is None, "Please enable all entities."
assert (state := hass.states.get(entity_entry.entity_id))
state = hass.states.get(entity_entry.entity_id)
assert state, f"State not found for {entity_entry.entity_id}"
assert state == snapshot(name=f"{entity_entry.entity_id}-state")