From c311e58d998fabc7568acd77f0a8bd42468f50b0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 10 Dec 2024 20:23:26 +0100 Subject: leds-toggle-mode: toggle in one call... ... and drop the condition. --- leds-toggle-mode.rsc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/leds-toggle-mode.rsc b/leds-toggle-mode.rsc index 136c9d1..07e12ae 100644 --- a/leds-toggle-mode.rsc +++ b/leds-toggle-mode.rsc @@ -6,8 +6,4 @@ # toggle LEDs mode # https://git.eworm.de/cgit/routeros-scripts/about/doc/leds-mode.md -:if ([ /system/leds/settings/get all-leds-off ] = "never") do={ - /system/leds/settings/set all-leds-off=immediate; -} else={ - /system/leds/settings/set all-leds-off=never; -} +/system/leds/settings/set all-leds-off=(({ "never"="immediate"; "immediate"="never" })->[ get all-leds-off ]); -- cgit v1.2.3-70-g09d2