From 0c5ad17350fb8623e6b8f8c3abae214bb1b5863c Mon Sep 17 00:00:00 2001 From: jambees <51675963+jambees@users.noreply.github.com> Date: Wed, 5 Jan 2022 23:30:52 +0000 Subject: [PATCH] Update wled.markdown (#20748) Co-authored-by: Franck Nijhof --- source/_integrations/wled.markdown | 56 ++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/source/_integrations/wled.markdown b/source/_integrations/wled.markdown index 1b568d3da7a..f087720bd26 100644 --- a/source/_integrations/wled.markdown +++ b/source/_integrations/wled.markdown @@ -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 +```