Current State
This node is used to fetch the last known state of any entity within Home Assistant when it receives an input. It’s useful for making decisions based on the current status of entities, such as checking if a light is already on before turning it off, or determining the temperature reading before adjusting the thermostat.
Configuration
Entity ID required
- Type:
string
- Accepts Mustache Templates
The id of the entity to return.
If State
- Type:
string
If the conditional statement is evaluated as true send the message to the first output otherwise send it to the second output. If blank there will only be one output.
Also see:
For
- Type:
number
The amount of time the entity state needs to have been constant for the "If state" to be true
State Type
- Type:
string
- Values:
string|number|boolean
- Default:
string
Convert the state of the entity to the selected type. Boolean will be converted to true based on if the string is equal by default to (y|yes|true|on|home|open
). Original value stored in msg.data.original_state
Block Input Overrides
- Type:
boolean
- Default:
false
Stop msg.payload
values from overriding local config
Inputs
payload.entityId
Type :
string
Overrides or sets the entity id for which the current state is being fetched
Outputs
Value types:
entity
: full entity objectentity id
: entity id of the triggered entityentity state
: entity state of the triggered entityconfig
: config properties of the node