[kaleidescape] Update Play/Pause status to Player channel widget (#15663)

Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
This commit is contained in:
mlobstein 2023-09-28 14:42:41 -05:00 committed by GitHub
parent b355fa7578
commit b0e20007bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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,