]> git.basschouten.com Git - openhab-addons.git/commitdiff
Correct Playlist vs Preset detection (#16146)
authorMatthew Skinner <matt@pcmus.com>
Sun, 31 Dec 2023 15:49:50 +0000 (02:49 +1100)
committerGitHub <noreply@github.com>
Sun, 31 Dec 2023 15:49:50 +0000 (16:49 +0100)
Signed-off-by: Matthew Skinner <matt@pcmus.com>
bundles/org.openhab.binding.wled/src/main/java/org/openhab/binding/wled/internal/api/WledApiV0110.java

index cd99bbf47511038ee867863a6ffcbf09b938ed2a..523a1b704d318a6d31299f6156e67421d77949ff 100644 (file)
@@ -62,7 +62,7 @@ public class WledApiV0110 extends WledApiV084 {
             logger.trace("Preset:{} json:{}", presetEntry.getKey(), presetEntry.getValue());
             PresetState preset = gson.fromJson(presetEntry.getValue(), PresetState.class);
             if (preset != null && counter > 0) {
-                if (preset.bri == 0) {
+                if (presetEntry.getValue().toString().contains("playlist")) {
                     playlistsOptions.add(new StateOption(presetEntry.getKey(), preset.n));
                 } else {
                     presetsOptions.add(new StateOption(presetEntry.getKey(), preset.n));