ha_set_state
Set or create the state of a Home Assistant entity to override its current state or create a virtual sensor.
Instructions
Set or create the state of an entity. Useful for creating virtual sensors or overriding states.
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": {
"entity_id": "<entity_id>",
"state": "<state>"
},
"name": "ha_set_state"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_id | Yes | Entity ID to set (e.g. 'sensor.my_custom_sensor') | |
| state | Yes | The state value to set | |
| attributes | No | Optional attributes to set on the entity |