mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 23:22:02 +01:00
Fix indexing of presets and playlists. (#13543)
Signed-off-by: Matthew Skinner <matt@pcmus.com>
This commit is contained in:
parent
bdbd5a1ede
commit
90ac9c7b78
@ -63,9 +63,9 @@ public class WledApiV0110 extends WledApiV084 {
|
|||||||
PresetState preset = gson.fromJson(presetEntry.getValue(), PresetState.class);
|
PresetState preset = gson.fromJson(presetEntry.getValue(), PresetState.class);
|
||||||
if (preset != null && counter > 0) {
|
if (preset != null && counter > 0) {
|
||||||
if (preset.bri == 0) {
|
if (preset.bri == 0) {
|
||||||
playlistsOptions.add(new StateOption(Integer.toString(counter), preset.n));
|
playlistsOptions.add(new StateOption(presetEntry.getKey(), preset.n));
|
||||||
} else {
|
} else {
|
||||||
presetsOptions.add(new StateOption(Integer.toString(counter), preset.n));
|
presetsOptions.add(new StateOption(presetEntry.getKey(), preset.n));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
counter++;
|
counter++;
|
||||||
|
Loading…
Reference in New Issue
Block a user