Home Assistant
API actions for the Home Assistant integration.
Home Assistant
Control and monitor your Home Assistant installation using long-lived tokens.
Get entity state
Retrieve the current state and attributes for a Home Assistant entity.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
entity_id | string | Yes | Home Assistant entity ID to retrieve |
Response
{
"attributes": {
"brightness": 180
},
"entity_id": "light.kitchen",
"state": "on"
}Set climate temperature
Set the target temperature for a climate entity.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
entity_id | string | Yes | Climate entity ID to update |
temperature | number | Yes | Target temperature value |
hvac_mode | string | No | Optional HVAC mode to set |
Response
{
"entity_id": "climate.living_room",
"hvac_mode": "heat",
"response": {
"result": "ok"
},
"temperature": 21
}Toggle entities
Toggle one or more Home Assistant entities.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
entity_ids | array | Yes | List of entity IDs to toggle |
Response
{
"entity_ids": [
"switch.garden"
],
"response": {
"result": "ok"
},
"service": "homeassistant.toggle"
}Trigger script
Run a Home Assistant script entity.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
script_entity_id | string | Yes | Script entity ID to trigger |
Response
{
"response": {
"result": "ok"
},
"script_entity_id": "script.goodnight"
}Turn off entities
Turn off one or more Home Assistant entities.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
entity_ids | array | Yes | List of entity IDs to turn off |
Response
{
"entity_ids": [
"light.kitchen"
],
"response": {
"result": "ok"
},
"service": "homeassistant.turn_off"
}Turn on entities
Turn on one or more Home Assistant entities.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
entity_ids | array | Yes | List of entity IDs to turn on |
brightness | number | No | Optional brightness value (0-255) for lights |
Response
{
"entity_ids": [
"light.kitchen"
],
"response": {
"result": "ok"
},
"service": "homeassistant.turn_on"
}