From 9be370f8df79243ba3ee8c90696e8ad06937e45c Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Tue, 26 Dec 2023 15:02:56 +0100 Subject: [PATCH] bundles/infobeamer-monitor: improve code a bit --- bundles/infobeamer-monitor/files/monitor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bundles/infobeamer-monitor/files/monitor.py b/bundles/infobeamer-monitor/files/monitor.py index b957633..3015381 100644 --- a/bundles/infobeamer-monitor/files/monitor.py +++ b/bundles/infobeamer-monitor/files/monitor.py @@ -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"]