Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.recorder.models.state Namespace Reference

Classes

class  LazyState
 

Functions

list[int] extract_metadata_ids (dict[str, int|None] entity_id_to_metadata_id)
 
dict[str, Any] row_to_compressed_state (Row row, dict[str, dict[str, Any]] attr_cache, float|None start_time_ts, str entity_id, str state, float|None last_updated_ts, bool no_attributes)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 EMPTY_CONTEXT = Context(id=None)
 

Detailed Description

Models states in for Recorder.

Function Documentation

◆ extract_metadata_ids()

list[int] homeassistant.components.recorder.models.state.extract_metadata_ids ( dict[str, int | None]  entity_id_to_metadata_id)
Extract metadata ids from entity_id_to_metadata_id.

Definition at line 28 of file state.py.

◆ row_to_compressed_state()

dict[str, Any] homeassistant.components.recorder.models.state.row_to_compressed_state ( Row  row,
dict[str, dict[str, Any]]  attr_cache,
float | None  start_time_ts,
str  entity_id,
str  state,
float | None  last_updated_ts,
bool  no_attributes 
)
Convert a database row to a compressed state schema 41 and later.

Definition at line 120 of file state.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.recorder.models.state._LOGGER = logging.getLogger(__name__)
private

Definition at line 23 of file state.py.

◆ EMPTY_CONTEXT

homeassistant.components.recorder.models.state.EMPTY_CONTEXT = Context(id=None)

Definition at line 25 of file state.py.