diff --git a/1og/button.py b/1og/button.py index cb3b80c..81663a5 100644 --- a/1og/button.py +++ b/1og/button.py @@ -131,6 +131,13 @@ class StateMenu: self.strip_center = SubStrip(self.strip, pixel=list(range(12, 24))) self.strip_aerie = SubStrip(self.strip, pixel=list(range(24, 36))) + self.strip_loop = SubStrip(self.strip, [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, + 15, 14, 13, 12, 23, 22, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 24, 25, 26, + 21, 20, 19, 18, 17, 16, 9, 10, 11, + ]) + self.doors = { "cellar": Door("10.42.1.20", "open", "close"), "aerie": Door("10.42.1.28", "open", "close"), @@ -221,9 +228,8 @@ class StateMenu: self.anim = [Chase(self.strip_cellar, 0.05, size=1, color=color.GREEN if self.target_state == "open" else color.RED)] elif self.state == StateMenu.RAINBOW: - self.strip_aerie.fill(color.GREEN if self.mqtt.is_open("oben") else color.RED) - self.strip_cellar.fill(color.GREEN if self.mqtt.is_open("unten") else color.RED) - self.anim = [RainbowComet(self.strip_center, 0.05, ring=True)] + self.strip.fill(color.BLACK) + self.anim = [RainbowComet(self.strip_loop, 0.05, ring=True)] def tick(self): if self.timeout and self.timeout < time.monotonic() and not (self.change_target and self.doors[self.change_target].inprogress):