Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class HeosBindingConstants extends HeosConstants {
public static final ThingTypeUID THING_TYPE_PLAYER = new ThingTypeUID(BINDING_ID, "player");
public static final ThingTypeUID THING_TYPE_GROUP = new ThingTypeUID(BINDING_ID, "group");

// List off all Channel Types
// List of all Channel Types
public static final ChannelTypeUID CH_TYPE_PLAYER = new ChannelTypeUID(BINDING_ID, "chPlayer");

// List of all Channel IDs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
import org.openhab.binding.heos.internal.resources.HeosMediaEventListener;
import org.openhab.binding.heos.internal.resources.Telnet;
import org.openhab.binding.heos.internal.resources.Telnet.ReadException;
import org.openhab.core.library.CoreItemFactory;
import org.openhab.core.library.types.OnOffType;
import org.openhab.core.thing.Bridge;
import org.openhab.core.thing.Channel;
Expand Down Expand Up @@ -378,8 +379,8 @@ private void addPlayerChannel(Thing childThing, @Nullable String groupId) {
properties.put(PROP_NAME, playerName);
properties.put(PID, pid);

Channel channel = ChannelBuilder.create(channelUID, "Switch").withLabel(playerName).withType(CH_TYPE_PLAYER)
.withProperties(properties).build();
Channel channel = ChannelBuilder.create(channelUID, CoreItemFactory.SWITCH).withLabel(playerName)
.withType(CH_TYPE_PLAYER).withProperties(properties).build();
updateThingChannels(channelManager.addSingleChannel(channel));
} catch (HeosNotFoundException e) {
logger.debug("Group is not yet initialized fully");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ thing-type.config.heos.player.pid.description = The internal Player ID

channel-type.heos.album.label = Album
channel-type.heos.buildGroup.label = Make Group
channel-type.heos.chPlayer.label = Player
channel-type.heos.clearQueue.label = Clear Queue
channel-type.heos.cover.label = Cover
channel-type.heos.currentPosition.label = Track Position
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
<tag>Mode</tag>
</tags>
</channel-type>
<channel-type id="chPlayer">
<item-type>Switch</item-type>
<label>Player</label>
</channel-type>
<channel-type id="playlists" advanced="true">
<item-type>String</item-type>
<label>Playlists</label>
Expand Down