Get state history
get_historyRetrieves the state changes for one or more Home Assistant entities over a chosen time window, returning a compact timeline so you can see when values changed and optionally include specific attributes.
Instructions
State changes for one or more entities over the last N hours, as a compact timeline.
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_ids": "<entity_ids>"
},
"name": "get_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hours | No | How far back to look. | |
| limit | No | Maximum state changes per entity, newest kept. | |
| attributes | No | Also return these attributes at each change, for example ['temperature','brightness']. | |
| entity_ids | Yes | One entity id or a list of entity ids. |