I was just about to ask this question and I saw your post. My Sony remote has four color buttons that do nothing (usually) and I was able to get them to do stuff with the Button Mapper app (like launch a channel) but I’d like to trigger an automation with one or more buttons. Has anyone cracked this?
I actually did figure this out! Similar useless color buttons on my Android TV and everything.
You can set up button mapper to push a webhook to HA that can trigger an automation. I had it set to change an input_select option in HA which I thne use to trigger a number of other things. The automation looks something like this
Hi. I just wanted to add my thanks because this post helped me achieve this in October 2024.
I paid $5 for the Button Mapper Android app to install on my Google TV.
The 4 colour buttons now send HTTP POST events to http://MYIP:8123/api/webhook/tv-red or similar.
HA has automations with webhook triggers to do things on those button presses.
Nice
Can you share more info on this please, I have a sony tv
I want to use the yellow button to trigger my lighting scene in my space.
How do I go about this?
Set your TV to send an HTTP POST request to your Home Assistant API
Set Home Assistant to trigger an automation on the corresponding webhook
If you haven’t done this before, you might like to mimic step 1 with a tool like Postman to send the HTTP request while you’re testing.
As in my post, the request should be something like, http://MYIP:8123/api/webhook/tv-red
I made up tv-red so use whatever you want. I used tv-red2 for pressing the button twice quickly and tv-red3 for holding the button because Button Mapper allows those 3 different button-press types.
The automation trigger is then “webhook” and use the ID, like tv-red.
Button Mapper is reasonably easy to setup, but the HTTP POST option was a paid feature.
Also, I had to enable some security settings to allow it to work fully, but the app guided me on what to select.
You run the app from the TV menu, select “Add Buttons”, press the button you want to edit, then select “single press”, then select “HTTP POST”, then enter the URL with your IP.
It might look different on your TV, but that’s probably enough to get you there