hi,
I’m trying to control in HA an esphome ledstrip via a button: yet I have to turn on, select the effect and turn it off always going to submenus of the light effects. but really I only want a single button to toggle the effect on and off.
in esphome I yet only able to make two separate button: one to enable the effect and one on to turn on/off the light. unfortunately If I try to set the effect in the “on” part of the on/off it doesn’t work…
- platform: template
name: my_random_button
on_press:
then:
- if:
condition:
light.is_off: DC_Neo
then:
- light.turn_on:
id: DC_Neo
brightness: 0.5
effect: Rainbow Effect With Custom Values
- platform: template
name: my_On-Off_button
on_press:
then:
- if:
condition:
light.is_off: DC_Neo
then:
- light.turn_on:
id: DC_Neo
brightness: 0.5
effect: Rainbow Effect With Custom Values
- if:
condition:
light.is_on: DC_Neo
then:
- light.turn_off: DC_Neo
Also with lambda didn’t work: cannot find the command to set the brightness.
does anyone know why or how to do it? I know probably with an automation but still figuring out how to do it…