Update wled.markdown (#20748)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
jambees 2022-01-05 23:30:52 +00:00 committed by GitHub
parent 5796657a44
commit 0c5ad17350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,3 +143,59 @@ data:
```
{% endraw %}
### Activating a preset
Activating a preset is an easy way to set a WLED light to a specific
configuration. Here is an example service call to set a WLED light
to a preset called My Preset:
```yaml
- service: light.turn_on
target:
entity_id: light.wled
- service: select.select_option
target:
entity_id: select.wled_preset
data:
option: "My Preset"
```
### Automation Using Specific Palette Name
An automation to turn on a WLED light and select a specific palette and
set intensity, and speed can be created by first calling the `light.turn_on`
service, then calling the `select.select_option` service to select the
palette, then call the `number.set_value` service to set the intensity
and again to set the speed.
Here is an example of all of these put together into an automation:
```yaml
- alias: "Turn on WLED rain effect when weather changes to rainy"
trigger:
- platform: state
entity_id: sensor.weather_condition
to: "rainy"
action:
- service: light.turn_on
target:
entity_id: light.wled
data:
effect: "Rain"
- service: select.select_option
target:
entity_id: select.wled_color_palette
data:
option: "Breeze"
- service: number.set_value
target:
entity_id: number.wled_intensity
data:
value: 200
- service: number.set_value
target:
entity_id: number.wled_speed
data:
value: 255
```