sanity check for pattern parser

This commit is contained in:
Maximilian Giller 2024-03-03 16:17:57 +01:00
parent d10359f8d1
commit 2bcc99a893

View file

@ -70,7 +70,7 @@ class MatrixDisplay:
async def pattern(self, pattern: str = "0,1", off_ms: int = 500, on_ms: int = 500):
# Parse
pattern_steps = [step.strip() == "1" for step in pattern.split(",")]
pattern_steps = [step.strip() == "1" for step in pattern.split(",") if step]
# Execute
for step in pattern_steps:
if step: