Android TV won't run commands or update states

I have a Google TV chromecast and have it linkt to some automations for when it is turned on or off

Today I turned it on and nothing happened, so I looked in the ha app and it said the state is off.

I can stil use the power button in ha to turn it on and off but the state won’t update.

I also tried running a command to watch a specific video on YouTube (am start -a android.intent.action.VIEW “- YouTube”) and al I did get was a little pop up on my TV saying “you don’t have an app that can do this”

Everything did work until today

Does anyone know what could be the problem and/or how to fix it?

2 Likes

Hi there @T.wan, I also am having this issue. I have been trying to track this down as well. It seems that my AndroidTV integration only wants to show the status Off for anything. Even though pressing the power button on the remote or within HA does change the state of the device.

I’m currently using HA (2022.11.2, 2022.11.2_17.0.0) via TrueCharts in TrueNAS Scale(TrueNAS-SCALE-22.02.4). AndroidTV integration.

Automations had been working up until a couple of days ago for me as well. I tried to revert versions without luck. I have seen some traffic on TrueCharts but nothing has solved the issues as of yet.

Thanks to anyone that solves this!

I suppose we also cannot rule out the fact that something may have changed on the latest version of Chromecast Firmware. But that was released end Sep (Chromecast Firmware.

I would like to add that I also have tried this via the Google Cast integration and get the same results. It just seems that the adb will not update from the device.

If you select/change the state within HA on the Google Cast integration the device state does seem to toggle to the Welcome to HA screen on my chromecast.

@T.wan ,

I just wanted to make sure you know just as much as I do. I believe I have been able to find the root of the problem and traced it down to the newest version of AndroidTV(chromecast firmware), as per my previous post.
If you have a look within Android TV 12 devices not working properly · Issue #323 · JeffLIrion/python-androidtv · GitHub, you will see they have found a bit of a workaround, but it is not 100% dependable for automations as of yet as there are still some cases where the device ‘randomly’ reports as OFF. I will continue to follow the github and see if a solution is found. It seems the issue we need is the library needs to be updated correctly to work with AndroidTV correctly (ADB commands).

I hope this makes a few other people just as hopeful as it does me.

Cheers,

Update 24 Nov 22: Fix was found and applied to the AndroidTV library. Let’s hope the next version will have the update!

There is a manual method to apply within the link I shared.

1 Like