bundles/infobeamer-monitor: only alert online devices once
This commit is contained in:
parent
dfadffd921
commit
7c70c600f4
1 changed files with 5 additions and 1 deletions
|
@ -169,7 +169,11 @@ while True:
|
|||
|
||||
state = new_state
|
||||
|
||||
if datetime.now(timezone.utc).strftime("%H%M") == "1312" and online_devices:
|
||||
if (
|
||||
datetime.now(timezone.utc).strftime("%H%M") == "1312"
|
||||
and online_devices
|
||||
and int(datetime.now(timezone.utc).strftime("%S")) < 30
|
||||
):
|
||||
mqtt_out("Online Devices: {}".format(", ".join(sorted(online_devices))))
|
||||
sleep(30)
|
||||
except KeyboardInterrupt:
|
||||
|
|
Loading…
Reference in a new issue