Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.recorder.history Namespace Reference

Namespaces

 const
 
 legacy
 
 modern
 

Functions

dict[str, list[State]] get_full_significant_states_with_session (HomeAssistant hass, Session session, datetime start_time, datetime|None end_time=None, list[str]|None entity_ids=None, Filters|None filters=None, bool include_start_time_state=True, bool significant_changes_only=True, bool no_attributes=False)
 
dict[str, list[State]] get_last_state_changes (HomeAssistant hass, int number_of_states, str entity_id)
 
dict[str, list[State|dict[str, Any]]] get_significant_states (HomeAssistant hass, datetime start_time, datetime|None end_time=None, list[str]|None entity_ids=None, Filters|None filters=None, bool include_start_time_state=True, bool significant_changes_only=True, bool minimal_response=False, bool no_attributes=False, bool compressed_state_format=False)
 
dict[str, list[State|dict[str, Any]]] get_significant_states_with_session (HomeAssistant hass, Session session, datetime start_time, datetime|None end_time=None, list[str]|None entity_ids=None, Filters|None filters=None, bool include_start_time_state=True, bool significant_changes_only=True, bool minimal_response=False, bool no_attributes=False, bool compressed_state_format=False)
 
dict[str, list[State]] state_changes_during_period (HomeAssistant hass, datetime start_time, datetime|None end_time=None, str|None entity_id=None, bool no_attributes=False, bool descending=False, int|None limit=None, bool include_start_time_state=True)
 

Variables

list __all__
 

Detailed Description

Provide pre-made queries on top of the recorder component.

Function Documentation

◆ get_full_significant_states_with_session()

dict[str, list[State]] homeassistant.components.recorder.history.get_full_significant_states_with_session ( HomeAssistant  hass,
Session  session,
datetime  start_time,
datetime | None   end_time = None,
list[str] | None   entity_ids = None,
Filters | None   filters = None,
bool   include_start_time_state = True,
bool   significant_changes_only = True,
bool   no_attributes = False 
)
Return a dict of significant states during a time period.

Definition at line 35 of file __init__.py.

◆ get_last_state_changes()

dict[str, list[State]] homeassistant.components.recorder.history.get_last_state_changes ( HomeAssistant  hass,
int  number_of_states,
str   entity_id 
)
Return the last number_of_states.

Definition at line 68 of file __init__.py.

◆ get_significant_states()

dict[str, list[State | dict[str, Any]]] homeassistant.components.recorder.history.get_significant_states ( HomeAssistant  hass,
datetime  start_time,
datetime | None   end_time = None,
list[str] | None   entity_ids = None,
Filters | None   filters = None,
bool   include_start_time_state = True,
bool   significant_changes_only = True,
bool   minimal_response = False,
bool   no_attributes = False,
bool   compressed_state_format = False 
)
Return a dict of significant states during a time period.

Definition at line 83 of file __init__.py.

◆ get_significant_states_with_session()

dict[str, list[State | dict[str, Any]]] homeassistant.components.recorder.history.get_significant_states_with_session ( HomeAssistant  hass,
Session  session,
datetime  start_time,
datetime | None   end_time = None,
list[str] | None   entity_ids = None,
Filters | None   filters = None,
bool   include_start_time_state = True,
bool   significant_changes_only = True,
bool   minimal_response = False,
bool   no_attributes = False,
bool   compressed_state_format = False 
)
Return a dict of significant states during a time period.

Definition at line 118 of file __init__.py.

◆ state_changes_during_period()

dict[str, list[State]] homeassistant.components.recorder.history.state_changes_during_period ( HomeAssistant  hass,
datetime  start_time,
datetime | None   end_time = None,
str | None   entity_id = None,
bool   no_attributes = False,
bool   descending = False,
int | None   limit = None,
bool   include_start_time_state = True 
)
Return a list of states that changed during a time period.

Definition at line 155 of file __init__.py.

Variable Documentation

◆ __all__

list homeassistant.components.recorder.history.__all__
private
Initial value:
1 = [
2  "NEED_ATTRIBUTE_DOMAINS",
3  "SIGNIFICANT_DOMAINS",
4  "get_full_significant_states_with_session",
5  "get_last_state_changes",
6  "get_significant_states",
7  "get_significant_states_with_session",
8  "state_changes_during_period",
9 ]

Definition at line 24 of file __init__.py.