check-health: use $ScriptLock

This commit is contained in:
Christian Hesse 2021-08-27 11:21:56 +02:00
parent 7afce17f70
commit 73dfb0c8ee

View file

@ -18,6 +18,7 @@
:global Identity;
:global LogPrintExit2;
:global ScriptLock;
:global SendNotification2;
:global SymbolForNotification;
@ -36,6 +37,8 @@
:set CheckHealthTemperatureNotified [ :toarray "" ];
}
$ScriptLock $0;
:foreach Name,Voltage in=$CheckHealthCurrent do={
:if ($Name ~ "(battery|voltage)" && \
[ :typeof ($CheckHealthLast->$Name) ] = "num" && \