Toggle an entity
entities_toggleFlips a Home Assistant entity between on and off by calling its domain's toggle action. Use when the desired end state is unknown or irrelevant and you only need to reverse its current state.
Instructions
Toggle an entity between on and off by calling its domain's toggle action.
Calls <domain>.toggle with {"entity_id": entity_id} over HTTP; the
resulting state depends on the entity's current state, so repeating this
call flips it back and forth.
Use when: the desired end state is unknown or irrelevant, only "flip it".
Not for: a deterministic on/off — use entities_turn_on/entities_turn_off.
Returns: the list of changed states from Home Assistant.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity_id | Yes | Full entity ID to toggle, e.g. 'switch.fan'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |