Skip to content

Commit

Permalink
Remove online_status
Browse files Browse the repository at this point in the history
  • Loading branch information
holmes committed Jul 5, 2017
1 parent c140f9e commit 919d970
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
Expand Up @@ -14,7 +14,6 @@
<channel id="volume" typeId="volume"/>
<channel id="mute" typeId="mute"/>
<channel id="playuri" typeId="playuri"/>
<channel id="onlinestatus" typeId="onlinestatus"/>

<!-- App Information -->
<channel id="appName" typeId="appName"/>
Expand Down Expand Up @@ -83,7 +82,6 @@
<channel id="volume" typeId="volume"/>
<channel id="mute" typeId="mute"/>
<channel id="playuri" typeId="playuri"/>
<channel id="onlinestatus" typeId="onlinestatus"/>

<!-- App Information -->
<channel id="appName" typeId="appName"/>
Expand Down Expand Up @@ -151,7 +149,6 @@
<channel id="volume" typeId="volume"/>
<channel id="mute" typeId="mute"/>
<channel id="playuri" typeId="playuri"/>
<channel id="onlinestatus" typeId="onlinestatus"/>

<!-- App Information -->
<channel id="appName" typeId="appName"/>
Expand Down Expand Up @@ -235,13 +232,6 @@
<description>Plays a given URI</description>
</channel-type>

<channel-type id="onlinestatus" advanced="true">
<item-type>Switch</item-type>
<label>Online</label>
<description>Is the Chromecast online</description>
<state readOnly="true"/>
</channel-type>

<!--App Information -->
<channel-type id="idling" advanced="true">
<item-type>Switch</item-type>
Expand Down
Expand Up @@ -47,7 +47,6 @@ public class ChromecastBindingConstants {
public static final String CHANNEL_VOLUME = "volume";
public static final String CHANNEL_MUTE = "mute";
public static final String CHANNEL_PLAY_URI = "playuri";
public static final String CHANNEL_ONLINE_STATUS = "onlinestatus";

public static final String CHANNEL_APP_NAME = "appName";
public static final String CHANNEL_APP_ID = "appId";
Expand Down
Expand Up @@ -36,7 +36,6 @@
import static org.openhab.binding.chromecast.ChromecastBindingConstants.CHANNEL_IDLING;
import static org.openhab.binding.chromecast.ChromecastBindingConstants.CHANNEL_METADATA_TYPE;
import static org.openhab.binding.chromecast.ChromecastBindingConstants.CHANNEL_MUTE;
import static org.openhab.binding.chromecast.ChromecastBindingConstants.CHANNEL_ONLINE_STATUS;
import static org.openhab.binding.chromecast.ChromecastBindingConstants.CHANNEL_STATUS_TEXT;
import static org.openhab.binding.chromecast.ChromecastBindingConstants.CHANNEL_VOLUME;
import static org.openhab.binding.chromecast.ChromecastBindingConstants.METADATA_CHANNELS;
Expand Down Expand Up @@ -239,7 +238,6 @@ public void updateStatus(ThingStatus status) {
}

public void updateStatus(ThingStatus status, ThingStatusDetail statusDetail, String description) {
callback.updateState(CHANNEL_ONLINE_STATUS, status == ThingStatus.ONLINE ? OnOffType.ON : OnOffType.OFF);
callback.updateStatus(status, statusDetail, description);
}
}

4 comments on commit 919d970

@jarlebh
Copy link

@jarlebh jarlebh commented on 919d970 Jul 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove this ?, I need that channel to see if the TV is turned on

@holmes
Copy link
Author

@holmes holmes commented on 919d970 Jul 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a 1:1 match of the Thing status so it didn't seem necessary. Does application/applicationId not tell you if the correct app is running?

@jarlebh
Copy link

@jarlebh jarlebh commented on 919d970 Jul 7, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaikreuzer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is correct that there should not be a channel that 1:1 replicates the Thing status.
Note that you can meanwhile react on Thing status changes in rules as well, see eclipse-archived/smarthome#3001 (comment).

Please sign in to comment.