Update switch.markdown

This commit is contained in:
themanieldaniel 2018-06-19 07:23:26 -04:00 committed by GitHub
parent 141adba52c
commit 35c673637e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,11 +12,11 @@ footer: true
Keeps track which switches are in your environment, their state and allows you to control them.
* Maintains a state per switch and a combined state `all_switches`.
* Registers services `switch/turn_on`, `switch/turn_off`, and `switch/toggle` to control switches.
* Registers services `switch.turn_on`, `switch.turn_off`, and `switch.toggle` to control switches.
### {% linkable_title Use the services %}
Go the **Developer Tools**, then to **Call Service** in the frontend, and choose `switch/turn_on` or `switch/turn_off` from the list of available services (**Available services:** on the left). Enter something like the sample below into the **Service Data** field and hit **CALL SERVICE**.
In the frontend open the sidebar. At the bottom, under **Developer Tools**, click **Services**. From the Service dropdown menu choose `switch.turn_on` or `switch.turn_off` from the list of available services. In the Entity dropdown menu choose or enter the entity ID you want to work with. This will enter something like the sample below into the **Service Data** field. Now hit **CALL SERVICE**.
```json
{"entity_id":"livingroom_pin2"}
@ -24,4 +24,4 @@ Go the **Developer Tools**, then to **Call Service** in the frontend, and choose
| Service data attribute | Optional | Description |
| ---------------------- | -------- | ----------- |
| `entity_id` | yes | Only act on specific switch. Else targets all.
| `entity_id` | yes | Only act on a specific switch. Otherwise it targets all switches.