light: - platform: neopixelbus type: RGB variant: 800kbps pin: GPIO15 num_leds: 8 id: Garden_1 restore_mode: RESTORE_DEFAULT_ON gamma_correct: 1.5 name: "Garden Light 1" internal: false effects: - addressable_rainbow: - addressable_rainbow: name: Rainbow Effect With Custom Values speed: 10 width: 50 - addressable_twinkle: - addressable_twinkle: name: Twinkle Effect With Custom Values twinkle_probability: 5% progress_interval: 4ms - lambda: name: fade update_interval: 3000ms lambda: |- static int state = 0; auto call = id(Garden_1).make_call(); call.set_transition_length(2900); if (initial_run) { state = 0; } if (state == 0) { call.set_red(1.0); call.set_green(0.0); call.set_blue(0.0); } else if (state ==1) { call.set_red(1.0); call.set_green(1.0); call.set_blue(0.0); } else if (state ==2) { call.set_red(0.0); call.set_green(1.0); call.set_blue(0.0); } else if (state ==3) { call.set_red(0.0); call.set_green(1.0); call.set_blue(1.0); } else if (state == 4) { call.set_red(0.0); call.set_green(0.0); call.set_blue(1.0); } else if (state == 5) { call.set_red(1.0); call.set_green(0.0); call.set_blue(1.0); } call.perform(); state += 1; if (state == 6) { state =0; }