diff --git a/source/_docs/tools/dev-tools.markdown b/source/_docs/tools/dev-tools.markdown index 1f128177525..5e2e0ed8096 100644 --- a/source/_docs/tools/dev-tools.markdown +++ b/source/_docs/tools/dev-tools.markdown @@ -30,22 +30,21 @@ The list of services in the “Service” drop down are automatically populated When a Service is selected, and if that service requires an `entity_id` to be passed, the “Entity” drop down will automatically be populated with corresponding entities. -A Service may also require additional input to be passed. It is commonly referred to as “service data”. The service data is only accepted in the JSON format, and it may be optional depending on the service. +A Service may also require additional input to be passed. It is commonly referred to as “service data”. The service data is accepted in YAML format, and it may be optional depending on the service. -When an entity is selected from the Entity drop down, it automatically populates service data with the corresponding `entity_id`. The service data JSON can then be modified to pass additional \[optional\] parameters. The following is an illustration on how to call a `light.turn_on` service. +When an entity is selected from the Entity drop down, it automatically populates service data with the corresponding `entity_id`. The service data YAML can then be modified to pass additional \[optional\] parameters. The following is an illustration on how to call a `light.turn_on` service. To turn on a light bulb, use the following steps: 1. Select `light.turn_on` from the Service drop down 2. Select the entity (typically the light bulb) from the Entity drop down (if no entity_id is selected, it turns on ALL lights) 3. If an entity is selected, the service data is populated with basic JSON that will be passed to the service. An additional data can also be passed by updating the JSON as below. -```json -{ - "entity_id": "light.bedroom", - "brightness": 255, - "rgb_color": [255, 0, 0] -} +```yaml +entity_id: light.bedroom +brightness: 255 +rgb_color: [255, 0, 0] ``` + ## States This section shows all the available entities, their corresponding state and the attribute values. The state and the attribute information is what Home Assistant sees at run time. To update the entity with a new state, or a new attribute value, click on the entity, scroll to the top, and modify the values, and click on “SET STATE” button. @@ -60,11 +59,12 @@ This Events section is as basic as it can get. It does only one thing – fires To fire an event, simply type the name of the event, and pass the event data in JSON format. For ex: To fire a custom event, enter the `event_type` as `event_light_state_changed` and the event data JSON as -```json -{ "state":"on" } +```yaml +state: on ``` If there is an automation that handles that event, it will be automatically triggered. See below: + ```yaml - alias: Capture Event trigger: @@ -86,19 +86,16 @@ It is a good practice to test the template code in the template editor prior to For more information about jinja2, visit [jinja2 documentation](http://jinja.pocoo.org/docs/dev/templates/), and also read templating document [here](/topics/templating/) - ## MQTT This section is only visible if the MQTT integration is configured. To configure MQTT, add `mqtt:` to the `configuration.yaml` file. For more information, refer to the [mqtt](/integrations/mqtt/) component. Even though MQTT in general provides deeper functionality, the developer tools section of MQTT is limited to publishing messages to a given topic. It supports templates for the payload. To publish a message, simply specify the topic name and the payload and click “PUBLISH” button. - ## Logs This section displays `syslog` information, and the contents of `home-assistant.log` with an option to clear and refresh the logs. - ## Info The Information tab simply provides information about the current installed version, [system health](/integrations/system_health/) (if enabled), additional links and credits.