This commit is contained in:
T
2025-09-27 20:58:28 +02:00
parent fe3d3967a8
commit 7a4ca70c59

View File

@@ -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):