This commit is contained in:
2026-02-25 11:10:52 +00:00
parent ae17970d8c
commit 1801e6d054

View File

@@ -40,12 +40,12 @@ def to_seconds(t):
def update():
global LAST_VALUE
data = get_data()
if data["noshutdown"] == 1:
exit
if data is None:
time = to_seconds(datetime.strptime(DEFAULT_SHUTDOWN, "%H:%M").time())
else:
time = to_seconds(datetime.strptime(data["time"], "%H:%M").time())
if data is not None and data["noshutdown"] == 1:
exit
now = to_seconds(datetime.now().time())
if (time - now) < 0:
exit