Running into the exact same issue and android debug bridge no longer detects the app running on my tv which means I can’t use custom rules to detect if apps are playing content or not
FWIW, This issue is also affecting the new Walmart Onn 4k pro Android TV (Android 12).
You can add it to HA, but the integration has issues.
It reports the Android TV as idle, when its playing something. And regardless what you do in the Android TV device it says the status has not changed in hours.
Also It reports that the google launcher is open when in fact youtube is open in the foreground playing a video. And the volume mute button is not working (but volume bar is).
The media_player.android_tv state is Idle and attributes of the entity are:
adb_response: null
hdmi_input: null
device_class: tv
friendly_name: Android TV
supported_features: 23997
volume_level: 1
is_volume_muted: false
app_name: Google TV Launcher
source: Google TV Launcher
entity_picture: /api/media_player_proxy/media_player.android_tv?token=e976a3383e1cd24e53b7ba4cfbc80ae5fca34e0cc114545aa099ed2c0bf5172f&cache=fc1e1a9f1b304f5a
Nice! Here is my take on it for reference. I also disable the normally active presence automation in the room when something is playing, and set it back on when nothing is playing.
alias: TV States
description: Check TV states
trigger:
- platform: state
entity_id: media_player.hisense_google_tv_2
from: null
to: null
condition:
- condition: or
conditions:
- condition: time
after: "13:00:00"
- condition: time
before: "06:00:00"
action:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.to_state.state == 'playing' }}"
sequence:
- service: light.turn_off
target:
entity_id:
- light.theater
- light.desk
- light.globes
- service: light.turn_on
target:
entity_id:
- light.ambient_left_light_2
- light.ambient_right_light_3
data:
color_temp: 454
brightness: 86
- service: automation.turn_off
target:
entity_id: automation.family_room_motion
- conditions:
- condition: template
value_template: "{{ trigger.to_state.state in ['paused', 'idle', 'turned_off'] }}"
sequence:
- service: automation.turn_on
target:
entity_id: automation.family_room_motion
- service: light.turn_off
target:
entity_id:
- light.ambient_left_light_2
- light.ambient_right_light_3
- service: light.turn_on
target:
entity_id:
- light.theater
- light.globes
mode: single