bundles/infobeamer-monitor: announce online devices at 09:00 CE(S)T

This commit is contained in:
Franzi 2024-11-16 14:14:05 +01:00
parent 6a203085b9
commit b3070a8b8b
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -1,9 +1,10 @@
#!/usr/bin/env python3
import logging
from datetime import datetime, timezone
from datetime import datetime
from json import dumps
from time import sleep
from zoneinfo import ZoneInfo
import paho.mqtt.client as mqtt
from requests import RequestException, get
@ -210,7 +211,7 @@ while True:
level="WARN",
)
if datetime.now(timezone.utc).strftime("%H%M") == "1312":
if datetime.now(ZoneInfo("Europe/Berlin")).strftime("%H%M") == "0900":
if available_credits is not None:
mqtt_out(f"Available Credits: {available_credits}")