Update default profile behaviour in light.turn_on (#17513)

This commit is contained in:
karliemeads 2021-04-30 18:40:43 -04:00 committed by Franck Nijhof
parent 5682d5a20d
commit ae4a6d8c83
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -24,6 +24,12 @@ The field transition is optional and can be omitted.
The `.default` suffix should be added to the entity identifier of each light to define a default value, e.g., for `light.ceiling_2` the `profile` field is `light.ceiling_2.default`. To define a default for all lights, the identifier `group.all_lights.default` can be used. Individual settings always supercede the `all_lights` default setting. The `.default` suffix should be added to the entity identifier of each light to define a default value, e.g., for `light.ceiling_2` the `profile` field is `light.ceiling_2.default`. To define a default for all lights, the identifier `group.all_lights.default` can be used. Individual settings always supercede the `all_lights` default setting.
<div class='note'>
If a light entity is in the `on` state, the default profile brightness and will only be applied if it is called in the service call data attribute `profile`, like any other named profile. The transition attribute will be applied for all `light.turn_on`, `light.toggle` and `light.turn_off` service calls, unless specified otherwise in the service call data.
</div>
### Service `light.turn_on` ### Service `light.turn_on`
Turns one light on or multiple lights on using [groups](/integrations/group/). Turns one light on or multiple lights on using [groups](/integrations/group/).
@ -88,6 +94,11 @@ automation:
brightness: 130 brightness: 130
rgb_color: [255,0,0] rgb_color: [255,0,0]
``` ```
<div class='note'>
If no data is sent, and a default profile exists, the default profile will be applied.
</div>
### Service `light.turn_off` ### Service `light.turn_off`