Fix reporting of Roku Home app (#12884)

Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com>
This commit is contained in:
mlobstein 2022-06-06 09:18:56 -05:00 committed by GitHub
parent 1958a82ffe
commit 22ebb9809b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -70,6 +70,7 @@ public class RokuBindingConstants {
public static final String EMPTY = ""; public static final String EMPTY = "";
public static final String ROKU_HOME = "Roku Home"; public static final String ROKU_HOME = "Roku Home";
public static final String ROKU_HOME_ID = "-1"; public static final String ROKU_HOME_ID = "-1";
public static final String ROKU_HOME_ID_562859 = "562859";
public static final String ROKU_HOME_BUTTON = "Home"; public static final String ROKU_HOME_BUTTON = "Home";
public static final String NON_DIGIT_PATTERN = "[^\\d]"; public static final String NON_DIGIT_PATTERN = "[^\\d]";
public static final String TV_APP = "tvinput.dtv"; public static final String TV_APP = "tvinput.dtv";

View File

@ -135,6 +135,12 @@ public class RokuHandler extends BaseThingHandler {
String activeAppId = ROKU_HOME_ID; String activeAppId = ROKU_HOME_ID;
try { try {
activeAppId = communicator.getActiveApp().getApp().getId(); activeAppId = communicator.getActiveApp().getApp().getId();
// 562859 is now reported when on the home screen, reset to -1
if (ROKU_HOME_ID_562859.equals(activeAppId)) {
activeAppId = ROKU_HOME_ID;
}
updateState(ACTIVE_APP, new StringType(activeAppId)); updateState(ACTIVE_APP, new StringType(activeAppId));
if (TV_APP.equals(activeAppId)) { if (TV_APP.equals(activeAppId)) {
tvActive = true; tvActive = true;