bundles/infobeamer-monitor: announce online devices at 09:00 CE(S)T
This commit is contained in:
parent
6a203085b9
commit
b3070a8b8b
1 changed files with 3 additions and 2 deletions
|
@ -1,9 +1,10 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime
|
||||||
from json import dumps
|
from json import dumps
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
from zoneinfo import ZoneInfo
|
||||||
|
|
||||||
import paho.mqtt.client as mqtt
|
import paho.mqtt.client as mqtt
|
||||||
from requests import RequestException, get
|
from requests import RequestException, get
|
||||||
|
@ -210,7 +211,7 @@ while True:
|
||||||
level="WARN",
|
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:
|
if available_credits is not None:
|
||||||
mqtt_out(f"Available Credits: {available_credits}")
|
mqtt_out(f"Available Credits: {available_credits}")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue