tl;dr
I broke my HA setup by updating, switched to WLED and need help converting one of my automations:
- alias: Swap led effects
initial_state: on
trigger:
platform: time
seconds: '/5'
condition:
condition: state
entity_id: light.holiday_lights
state: 'on'
action:
service: input_select.select_option
data_template:
entity_id: input_select.holiday_led_effect
option: >
{% if is_state('input_select.holiday_led_effect' , 'Halloween') %} Halloween_Eyes
{% else %} Halloween {% endif %}
A few years ago, I got my HA all set up and running using this guide:
With help from some of the folks here, I created an automation to alternate between a specific set of effects every 5 minutes when activated and light state was on.
My original post here:
My raw script here:
https://gist.githubusercontent.com/mf-social/a3914701aa2344f78edc8f956a7bc864/raw/50750752b0c614b9f8d021ad78df1682d26591c7/automations.yaml
About a week ago, I finally pulled the trigger on my HA update and it broke everything. I was unable to recover any of my previous scripts. Since I lost my previous setup, I decided to start fresh with WLED. Thankfully, the script above was preserved on this site. However, it doesnāt seem to work with WLED.
Hoping for some guidance on adapting it to work with WLED. Iām finding the UI of HA to be confusing, but if a UI solution for this exists, Iām happy to use it. Otherwise, yaml.
Hereās the piece I need help converting:
- alias: Swap led effects
initial_state: on
trigger:
platform: time
seconds: '/5'
condition:
condition: state
entity_id: light.holiday_lights
state: 'on'
action:
service: input_select.select_option
data_template:
entity_id: input_select.holiday_led_effect
option: >
{% if is_state('input_select.holiday_led_effect' , 'Halloween') %} Halloween_Eyes
{% else %} Halloween {% endif %}
As I understand it, āinitial_stateā is no longer a thing in the latest version of HA, so Iāll remove that, āentity_idā becomes light.wled
So, factoring in those changes:
- alias: Swap led effects
trigger:
platform: time
seconds: '/5'
condition:
condition: state
entity_id: light.wled
state: 'on'
action:
service: input_select.select_option
data_template:
entity_id: light.wled
option: >
{% if is_state('input_select.holiday_led_effect' , 'Halloween') %} Halloween_Eyes
{% else %} Halloween {% endif %}
However, still not working. Guessing thereās probably an issue with indentation. Also, seems like the method for triggering WLED effects may be different as well. Using this doc as a guide: WLED - Home Assistant. Looks like āeffectā is what I need, but it doesnāt seem to give any examples of what Iām trying to doā¦orā¦at all.
Itās probably an easy fix, but all I keep getting is safe modeā¦ Thanks in advance.