Home Assistant Unofficial Reference 2024.12.1
homeassistant.helpers.state Namespace Reference

Functions

None async_reproduce_state (HomeAssistant hass, State|Iterable[State] states, *Context|None context=None, dict[str, Any]|None reproduce_options=None)
 
float state_as_number (State state)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 

Detailed Description

Helpers that help with state related things.

Function Documentation

◆ async_reproduce_state()

None homeassistant.helpers.state.async_reproduce_state ( HomeAssistant  hass,
State | Iterable[State states,
*Context | None   context = None,
dict[str, Any] | None   reproduce_options = None 
)
Reproduce a list of states on multiple domains.

Definition at line 30 of file state.py.

◆ state_as_number()

float homeassistant.helpers.state.state_as_number ( State  state)
Try to coerce our state to a number.

Raises ValueError if this is not possible.

Definition at line 74 of file state.py.

Variable Documentation

◆ _LOGGER

homeassistant.helpers.state._LOGGER = logging.getLogger(__name__)
private

Definition at line 26 of file state.py.