Home AssistantHome AssistantContributors
In code
Statehass.statesnative_value
Also
states, state object

States live in the state machine. A state is always stored as a string, even when it is a number. When it changes, Home Assistant fires a state_changed event, and the recorder writes it to the history.

Two states are special: unavailable and unknown.