]> git.basschouten.com Git - openhab-addons.git/commitdiff
[WLED] Fix Nightlight sleep timer to use default (#11389)
authorsvjense <55270074+svjense@users.noreply.github.com>
Mon, 18 Oct 2021 18:45:22 +0000 (05:45 +1100)
committerGitHub <noreply@github.com>
Mon, 18 Oct 2021 18:45:22 +0000 (20:45 +0200)
Based on WLED API (https://kno.wled.ge/interfaces/http-api/) current handler uses NL=1 so sleep timer is hard coded to 1 minute. Should be default (ND) to use configured time in WLED.

Fixes #11389

Signed-off-by: Sven Jensen <github@s7j.de>
Co-authored-by: Sven Jensen <github@s7j.de>
bundles/org.openhab.binding.wled/src/main/java/org/openhab/binding/wled/internal/WLedHandler.java

index 084df9a4a598c9b14aea718e10679f3e14f1a561..0f08a076c9610a68ad1c2da42f4aae31d2d485ac 100644 (file)
@@ -387,7 +387,7 @@ public class WLedHandler extends BaseThingHandler {
                 break;
             case CHANNEL_SLEEP:
                 if (OnOffType.ON.equals(command)) {
-                    sendGetRequest("/win&NL=1");
+                    sendGetRequest("/win&ND");
                 } else {
                     sendGetRequest("/win&NL=0");
                 }