Skip to content

Fire OS 8 (Android 11) devices typed as FIRETV never detect the current app #372

Description

@ziopanna

Device: Fire TV Stick 4K Max (AFTKRT), Fire OS 8.1.8.2. device_properties reports
sw_version = "11". Library androidtv 0.0.75, via Home Assistant 2026.9.3.

Symptom: with device_class = firetv the entity never leaves idle, even with Netflix
paused or playing in the foreground. app_id is empty.

Cause: in basetv/basetv.py every Android-version-dependent command (_cmd_current_app,
_cmd_current_app_media_session_state, and the other version switches at lines 138, 177-190,
222-234, 251, 276, 315-327) is gated on self.DEVICE_ENUM == constants.DeviceEnum.ANDROIDTV.
A device typed FIRETV therefore always falls back to the legacy command, which on Fire OS 8
returns nothing:

Command Result on Fire OS 8.1.8.2
dumpsys window windows | grep -E "mCurrentFocus|mFocusedApp" (legacy) no output
dumpsys window windows | grep -E "mInputMethod(Input)?Target" (Android 11 variant) com.netflix.ninja/...MainActivity

With $CURRENT_APP empty, CMD_MEDIA_SESSION_STATE greps for nothing and the state falls
back to idle, although the media session is there (state=2, i.e. paused).

Workaround: configure the device as androidtv instead of firetv (and override the
power commands with CMD_TURN_OFF_FIRETV / CMD_TURN_ON_FIRETV). With that, playing /
paused and app_id are correct, and physical-remote play/pause is seen.

Suggested fix: choose the Android-version variants from sw_version for both device
types, i.e. drop the DEVICE_ENUM == ANDROIDTV condition from the version checks (or extend
it to FIRETV). Fire OS 8 is Android 11 and reports sw_version = "11".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions