Set an entity state
ha_set_stateOverwrite a Home Assistant entity's state and attributes to update its internal representation, creating the entity if needed; does not control the physical device.
Instructions
Overwrite an entity's state and attributes. This only changes the representation inside Home Assistant — it does NOT talk to the physical device. To control a device, use ha_call_service instead. Args: entityId (required), state (required), attributes (optional). Creates the entity when it does not exist yet.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"entityId": "<entityId>",
"state": "<state>"
},
"name": "ha_set_state"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes | New state value | |
| entityId | Yes | Entity id to set | |
| attributes | No | Attributes to store with the state |