Change check to < 0

This commit is contained in:
CPD 2025-03-17 16:42:05 +01:00
parent 0bf410e14f
commit ff35e7ea28

View File

@ -292,8 +292,8 @@ class LedScript:
raise InvalidScriptUpdate(f"Cannot update row {idx+1} the script only has {n_rows} rows")
if not (led >= 0 and led <= 100):
raise InvalidScriptUpdate(f"Cannot update row {idx+1} because the led value {led}% is not in the range of 0%-100%")
if not (dt > 0):
raise InvalidScriptUpdate(f"Cannot update row {idx+1} because the dt value '{dt}' <= 0")
if dt < 0:
raise InvalidScriptUpdate(f"Cannot update row {idx+1} because the dt value '{dt}' < 0")
if self.current_dt:
current_idx = self.get_current_index(self.current_dt)
if current_idx < idx: