mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-05-01 16:57:34 +00:00
1.1 KiB
1.1 KiB
layout | title | description | date | sidebar | comments | sharing | footer |
---|---|---|---|---|---|---|---|
page | RESTful switch support | Instructions how to integrate REST switches into Home Assistant. | 2015-09-14 19:10 | false | false | true | true |

To enable this switch, add the following lines to your configuration.yaml
file:
switch: platform: rest resource: http://IP_ADDRESS/ENDPOINT name: "Bedroom Switch" body_on: "ON" body_off: "OFF"
Configuration variables:
- **resource** (*Required*): The resource or endpoint that contains the value.
- **name** (*Optional*): Name of the REST switch.
- **body_on** (*Optional*): The body that represents enabled state. Default is "ON".
- **body_off** (*Optional*):The body that represents disabled state. Default is "OFF".
<p class='note warning'>
Make sure that the URL matches exactly your endpoint or resource.
</p>