mode-button: do not act on disabled LED

This commit is contained in:
Christian Hesse 2024-11-15 23:07:26 +01:00
parent 53b6f7720e
commit 08ad4e5194

View file

@ -36,7 +36,8 @@
:global IfThenElse;
:local LED [ /system/leds/find where leds=$ModeButtonLED type~"^(on|off)\$" interface=[] ];
:local LED [ /system/leds/find where leds=$ModeButtonLED \
!disabled type~"^(on|off)\$" interface=[] ];
:if ([ :len $LED ] = 0) do={
:return false;
}