MCPcopy
hub / github.com/hacs/integration / _entity_state

Function _entity_state

tests/conftest.py:287–292  ·  view source on GitHub ↗
(entity: er.RegistryEntry)

Source from the content-addressed store, hash-verified

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(

Callers 1

assert_hacs_dataFunction · 0.85

Calls 2

recursive_remove_keyFunction · 0.90
getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…