upsert_history_stats_sensor
Create or update a Home Assistant history_stats sensor entry to track entity state durations or counts. Requires a Home Assistant restart to apply the change.
Instructions
Create or update a history_stats sensor entry.
A HA restart is required for it to take effect (response includes restart_required=true). Example config: {"entity_id": "binary_sensor.moestuin_regent", "state": "on", "type": "time", "end": "{{ now() }}", "duration": {"hours": 2}}
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": {
"name": "<name>",
"config": "<config>"
},
"name": "upsert_history_stats_sensor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| config | Yes |