diff --git a/docs/dev_101_services.md b/docs/dev_101_services.md index 116bc8b2..9571b782 100644 --- a/docs/dev_101_services.md +++ b/docs/dev_101_services.md @@ -59,20 +59,39 @@ Services are published under the domain name of your integration, so in `service ```yaml # Example services.yaml entry +# Service ID set_speed: + # Service name as shown in UI + name: Set speed # Description of the service description: Sets fan speed. + # If the service accepts entity IDs, target allows the user to specify entities by entity, device, or area. If `target` is specified, `entity_id` should not be defined in the `fields` map. By default it shows only targets matching entities from the same domain as the service, but if further customization is required, target supports the entity, device, and area selectors (https://www.home-assistant.io/docs/blueprint/selectors/). Entity selector parameters will automatically be applied to device and area, and device selector parameters will automatically be applied to area. + target: # Different fields that your service accepts fields: # Key of the field - entity_id: - # Description of the field - description: Name(s) of the entities to set - # Example value that can be passed for this field - example: "fan.living_room" speed: + # Field name as shown in UI + name: Speed + # Description of the field description: Speed setting + # Whether or not field is required + required: true + # Advanced options are only shown when the advanced mode is enabled for the user + advanced: true + # Example value that can be passed for this field example: "low" + # The default value + default: "high" + # Selector (https://www.home-assistant.io/docs/blueprint/selectors/) to control the input UI for this field + selector: + select: + options: + - "off" + - "low" + - "medium" + - "high" + ``` ## Entity Services