Android TV Remote - Volume Control

Hi Everyone,

I’m after a little bit of advice. I have recently migrated my Smart Home over to HA, so still learning the in’s and out’s. Currently I’m struggling with one of my automatons and haven’t managed to find any answers on the forum. This is the most useful topic I’ve found, but sadly doesn’t provide me with the answers I’m looking for.

I have a Sony Bravia TV that has Android TV builtin and I’m connected using the Android TV Remote integration.

What I’m trying to achieve in my automation is to adjust the Volume, both after a trigger event and when the running APP changes. As an example, when I’m watching YouTube I’d like to reduce volume. I can see that within the Device that HA knows what APP, “com.google.android.youtube”, is running but I can’t find anywhere that allows me to use that as a Trigger.

Any help or direction would be gratefully received.

Thanks,

Garry

Hi,

Probably not useful, but faced with the complexity of using ADB to get identifiers out of Google TV apps, I dropped back to ESPhome and IR blasters like a Neanderthal:
https://www.amazon.co.uk/dp/B0B777ZLLT?psc=1&ref=ppx_yo2ov_dt_b_product_details

ESP8285 ESP-01M Digital Infrared Transceiver Sensor IR seem relatively common, and not that difficult to scan for codes, then configure triggers in ESPhome. There are larger devices with more LEDs, but tend to need more hacking as they arrive with Tyua and closed uP that can need a brain transplant.

The downside is nice looking 3D printed cases block the IR emitter, so mine is floating on a chopped-up USB lead in front of the sound bar!

The common pain is remotes ALTER volume rather than set ABSOLUTE levels, so “(+) VOL” might work, but “set 50%” can’t.

this works for my bravia:

trigger:
  - platform: state
    entity_id:
      - remote.penthouse_android_tv
    attribute: current_activity
    to: com.sony.dtv.tvx

note that i’m using the android tv remote integration here. there are several different integrations that connect to the bravia.

replace the “to” to whatever you want…

i think you just asked about the trigger. holler if you need help with other aspects. wasn’t clear if you needed help on the volume part or not, but that should be easy. media_player integration does fine for that.

Thanks for your help @armedad, that worked a treat.

1 Like

awesome. glad to hear! :slight_smile: