From da55816a268920c0002cf9ea4194e4508315d630 Mon Sep 17 00:00:00 2001 From: jambees <51675963+jambees@users.noreply.github.com> Date: Sat, 18 Dec 2021 15:50:50 +0000 Subject: [PATCH 1/4] Update wled.markdown Added 2 examples - one for how to use a WLED preset and the other for how to set various WLED settings in an automation. --- source/_integrations/wled.markdown | 68 ++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/source/_integrations/wled.markdown b/source/_integrations/wled.markdown index 1b568d3da7a7..be0c8ec49f33 100644 --- a/source/_integrations/wled.markdown +++ b/source/_integrations/wled.markdown @@ -143,3 +143,71 @@ 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: + +{% raw %} + +```yaml +service: light.turn_on +data: + entity_id: light.wled +service: select.select_option +target: + entity_id: select.wled_preset +data: + option: 'My Preset' +``` + +{% endraw %} + +### 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 calling 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: + +{% raw %} + +```yaml +- alias: 'Turn on WLED rain effect when weather changes to rainy' + description: 'Turns on WLED light, setting effect to Rain, palette to Breeze, intensity to 200 and speed to 255' + trigger: + - platform: state + entity_id: sensor.weather_condition + to: 'rainy' + condition: + - condition: time + after: '08:00:00' + before: '23:00:00' + action: + - service: light.turn_on + data: + entity_id: light.wled + 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 +``` + +{% endraw %} From 1c2af9fe792f1c77040d0bb1fee01e2a2c04ddfc Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 6 Jan 2022 00:24:33 +0100 Subject: [PATCH 2/4] Tweak --- source/_integrations/wled.markdown | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/source/_integrations/wled.markdown b/source/_integrations/wled.markdown index be0c8ec49f33..da9ae743d401 100644 --- a/source/_integrations/wled.markdown +++ b/source/_integrations/wled.markdown @@ -150,21 +150,17 @@ 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: -{% raw %} - ```yaml -service: light.turn_on -data: - entity_id: light.wled -service: select.select_option -target: - entity_id: select.wled_preset -data: - option: 'My Preset' +- service: light.turn_on + target: + entity_id: light.wled +- service: select.select_option + target: + entity_id: select.wled_preset + data: + option: "My Preset" ``` -{% endraw %} - ### Automation Using Specific Palette Name An automation to turn on a WLED light and select a specific palette and From ea09b8a27e24a352962ccc2ece2fc29d004559e6 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 6 Jan 2022 00:25:24 +0100 Subject: [PATCH 3/4] Tweak --- source/_integrations/wled.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/_integrations/wled.markdown b/source/_integrations/wled.markdown index da9ae743d401..26b1b37fef0f 100644 --- a/source/_integrations/wled.markdown +++ b/source/_integrations/wled.markdown @@ -164,9 +164,9 @@ to a preset called 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 calling the number.set_value service to set the intensity +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: From 8d6bafb91b84dc083115a5b48c127bcc706689fe Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 6 Jan 2022 00:27:35 +0100 Subject: [PATCH 4/4] Tweak --- source/_integrations/wled.markdown | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/source/_integrations/wled.markdown b/source/_integrations/wled.markdown index 26b1b37fef0f..f087720bd26e 100644 --- a/source/_integrations/wled.markdown +++ b/source/_integrations/wled.markdown @@ -171,29 +171,23 @@ and again to set the speed. Here is an example of all of these put together into an automation: -{% raw %} - ```yaml -- alias: 'Turn on WLED rain effect when weather changes to rainy' - description: 'Turns on WLED light, setting effect to Rain, palette to Breeze, intensity to 200 and speed to 255' +- alias: "Turn on WLED rain effect when weather changes to rainy" trigger: - platform: state entity_id: sensor.weather_condition - to: 'rainy' - condition: - - condition: time - after: '08:00:00' - before: '23:00:00' + to: "rainy" action: - service: light.turn_on - data: + target: entity_id: light.wled - effect: Rain + data: + effect: "Rain" - service: select.select_option target: entity_id: select.wled_color_palette data: - option: Breeze + option: "Breeze" - service: number.set_value target: entity_id: number.wled_intensity @@ -205,5 +199,3 @@ Here is an example of all of these put together into an automation: data: value: 255 ``` - -{% endraw %}