#Getting the active Android TV app

1 messages · Page 1 of 1 (latest)

tacit osprey
#

Hi there
I'm trying to create an automation which reads the current active app in my android tv by checking {{ state_attr('media_player.android_tv_192_168_50_109', 'adb_response').split(' ')[3].split('/')[0] }} after performing dumpsys activity activities | grep mResumedActivity
What is the best way to automatically perform that action every like 5 seconds or so? Just run an automation that runs every 5 seconds as long as the TV is on?

hollow stone
#

Isn't the active app provided in the source attribute?

tacit osprey
#

😨

#

Looks like it's provided by the app_name attribute, haha. Not sure how I missed that