(entity: er.RegistryEntry)
| 285 | ] |
| 286 | |
| 287 | def _entity_state(entity: er.RegistryEntry) -> dict[str, Any]: |
| 288 | state = hacs.hass.states.get(entity.entity_id) |
| 289 | return { |
| 290 | "state": state.state if state else None, |
| 291 | "attributes": recursive_remove_key(state.attributes, ("display_precision", "update_percentage")) if state else None, |
| 292 | } |
| 293 | |
| 294 | snapshot.assert_match( |
| 295 | safe_json_dumps( |
no test coverage detected
searching dependent graphs…