bundles/infobeamer-monitor: improve code a bit

This commit is contained in:
Franzi 2023-12-26 15:02:56 +01:00
parent b5475df467
commit 9be370f8df
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -117,6 +117,7 @@ while True:
LOG.info("device {} is now {}".format(did, online_status))
mqtt_out(
f"online status changed to {online_status}",
level="INFO" if device["is_online"] else "WARN",
device=device,
)
if device["is_online"]:
@ -131,6 +132,7 @@ while True:
level="WARN",
device=device,
)
must_dump_state = True
if (
device["is_synced"] != state[did]["is_synced"]