[kaleidescape] Update Play/Pause status to Player channel widget (#15663)
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
This commit is contained in:
parent
b355fa7578
commit
b0e20007bd
|
@ -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.DecimalType;
|
||||||
import org.openhab.core.library.types.OnOffType;
|
import org.openhab.core.library.types.OnOffType;
|
||||||
import org.openhab.core.library.types.PercentType;
|
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.QuantityType;
|
||||||
import org.openhab.core.library.types.RawType;
|
import org.openhab.core.library.types.RawType;
|
||||||
import org.openhab.core.library.types.StringType;
|
import org.openhab.core.library.types.StringType;
|
||||||
|
@ -111,6 +112,8 @@ public enum KaleidescapeMessageHandler {
|
||||||
handler.updateChannel(PLAY_MODE,
|
handler.updateChannel(PLAY_MODE,
|
||||||
new StringType(KaleidescapeStatusCodes.PLAY_MODE.get(matcher.group(1))));
|
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(PLAY_SPEED, new StringType(matcher.group(2)));
|
||||||
|
|
||||||
handler.updateChannel(TITLE_NUM, new DecimalType(Integer.parseInt(matcher.group(3))));
|
handler.updateChannel(TITLE_NUM, new DecimalType(Integer.parseInt(matcher.group(3))));
|
||||||
|
@ -312,6 +315,9 @@ public enum KaleidescapeMessageHandler {
|
||||||
handler.updateChannel(MUSIC_PLAY_MODE,
|
handler.updateChannel(MUSIC_PLAY_MODE,
|
||||||
new StringType(KaleidescapeStatusCodes.PLAY_MODE.get(matcher.group(1))));
|
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_PLAY_SPEED, new StringType(matcher.group(2)));
|
||||||
|
|
||||||
handler.updateChannel(MUSIC_TRACK_LENGTH,
|
handler.updateChannel(MUSIC_TRACK_LENGTH,
|
||||||
|
|
Loading…
Reference in New Issue