06.11.2023, 06:34
Your script is executing itself when the status value is different from control. It executes two instances where both check for an opposite value. This means that one of them will fail and then will execute the same thing again.
If a single on/off or off/on is enough you can add this check to the beginning of you script. It will stop execution if this script is triggered by an event script.
Otherwise you can use a resident script to check if status and control values are different every X seconds.
If a single on/off or off/on is enough you can add this check to the beginning of you script. It will stop execution if this script is triggered by an event script.
Code:
if event.sender == 'se' then
return
end
Otherwise you can use a resident script to check if status and control values are different every X seconds.