Compare commits

..

2 Commits

  1. 30
      ledstring.yml

30
ledstring.yml

@ -33,22 +33,16 @@ binary_sensor:
name: "Button" name: "Button"
on_click: on_click:
then: then:
- switch.toggle: - lambda: |
id: ledstring_switch std::string current = id(ledstring).get_effect_name();
std::vector<LightEffect *> effects = id(ledstring).get_effects();
switch: for(int i=0; i<effects.size(); i++) {
- platform: template if(effects[i]->get_name().compare(current) == 0) {
optimistic: True auto call = id(ledstring).turn_on();
id: ledstring_switch call.set_effect(effects[(i+1) % effects.size()]->get_name());
name: "LED String Switch" call.perform();
turn_on_action: }
- light.turn_on: }
id: ledstring
brightness: 70%
effect: rainbow
turn_off_action:
- light.turn_off:
id: ledstring
light: light:
- platform: neopixelbus - platform: neopixelbus
@ -72,6 +66,10 @@ light:
name: rainbow name: rainbow
speed: 10 speed: 10
width: 50 width: 50
- addressable_rainbow:
name: slowrainbow
speed: 1
width: 70
- addressable_flicker: - addressable_flicker:
name: flicker name: flicker
update_interval: 50ms update_interval: 50ms

Loading…
Cancel
Save