From b0e20007bdd9d464c0fb63cb1e917a5103404f02 Mon Sep 17 00:00:00 2001 From: mlobstein Date: Thu, 28 Sep 2023 14:42:41 -0500 Subject: [PATCH] [kaleidescape] Update Play/Pause status to Player channel widget (#15663) Signed-off-by: Michael Lobstein --- .../internal/handler/KaleidescapeMessageHandler.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bundles/org.openhab.binding.kaleidescape/src/main/java/org/openhab/binding/kaleidescape/internal/handler/KaleidescapeMessageHandler.java b/bundles/org.openhab.binding.kaleidescape/src/main/java/org/openhab/binding/kaleidescape/internal/handler/KaleidescapeMessageHandler.java index b0e7a8b74..98123eddb 100644 --- a/bundles/org.openhab.binding.kaleidescape/src/main/java/org/openhab/binding/kaleidescape/internal/handler/KaleidescapeMessageHandler.java +++ b/bundles/org.openhab.binding.kaleidescape/src/main/java/org/openhab/binding/kaleidescape/internal/handler/KaleidescapeMessageHandler.java @@ -34,6 +34,7 @@ import org.openhab.binding.kaleidescape.internal.communication.KaleidescapeStatu import org.openhab.core.library.types.DecimalType; import org.openhab.core.library.types.OnOffType; import org.openhab.core.library.types.PercentType; +import org.openhab.core.library.types.PlayPauseType; import org.openhab.core.library.types.QuantityType; import org.openhab.core.library.types.RawType; import org.openhab.core.library.types.StringType; @@ -111,6 +112,8 @@ public enum KaleidescapeMessageHandler { handler.updateChannel(PLAY_MODE, new StringType(KaleidescapeStatusCodes.PLAY_MODE.get(matcher.group(1)))); + handler.updateChannel(CONTROL, "2".equals(matcher.group(1)) ? PlayPauseType.PLAY : PlayPauseType.PAUSE); + handler.updateChannel(PLAY_SPEED, new StringType(matcher.group(2))); handler.updateChannel(TITLE_NUM, new DecimalType(Integer.parseInt(matcher.group(3)))); @@ -312,6 +315,9 @@ public enum KaleidescapeMessageHandler { handler.updateChannel(MUSIC_PLAY_MODE, new StringType(KaleidescapeStatusCodes.PLAY_MODE.get(matcher.group(1)))); + handler.updateChannel(MUSIC_CONTROL, + "2".equals(matcher.group(1)) ? PlayPauseType.PLAY : PlayPauseType.PAUSE); + handler.updateChannel(MUSIC_PLAY_SPEED, new StringType(matcher.group(2))); handler.updateChannel(MUSIC_TRACK_LENGTH,