Update 5/2/25 - TASKER stopped working, switched to Android TV remote, works great
UPDATE: a couple weeks ago tasker just stopped working. I didn’t even bother trouble shooting it so it could be something simple. HOWEVER miraculously adding the “Android TV Remote” seems to now be very reliable for reporting the state of the Shield (believe me it was NOT for a while). Note: Android Debug bridge works too but has a VERY slow polling rate. I made 2 automations: one for ON one for OFF. Its Working basically just as well as the webhook I used before.
I use both integrations so shield’s in there twice as ADB has features
OLD POST: Does not work but may be useful for others
Even after doing the manual polling rate as mentioned above, I still found it too slow. I had to turn CEC off a long time ago because between the receiver , the Shield, my PS5, and my TV everything was turning on and off like it was possessed. Now I rely on HA to turn on my TV.
My solution was to download an app called “tasker” and use an HTTP request to access HA automation webhooks on “display on” and another for “display off.” The response is instantaneous now.
In addition to turning on the TV, I have it poll the device as well (seems to work better if you have it poll BOTH the media_player and remote entities at the same time).
Google play store would not let me buy Tasker so I downloaded the 7 day trial on tasker’s website on my PC and used ADB to install it:
https://tasker.joaoapps.com/
After I got it working, I used his patreon method to get a license for the software (it’s “per device”). That gives you a download link to install the full version and you then enter a code (hint: you can “paste” it into the license key field from PC to Droid using adb shell input text [code no quotes]).
Tasker’s got a lot of cool features though, including some kind of remote interface to make new tasks, it’s a nice $4 upgrade for my shield.