Tiny Wren

Fixing my Sony Bravia TV issues

My Sony Bravia 49XE9005 has a great picture and the size is just right.

Its software, however, is infuriating. I suffer from two main issues.

  1. Intermittently the TV won't select my Sonos Beam soundbar to output audio after switching on.
  2. Switching HDMI is too slow and makes me cry.

Thankfully, rather than spend a small fortune to buy a new TV only to have another set of problems, I've overcome them with Home Assistant!

Below roughly outlines what I did.

Setting up Home Assistant to control the TV

This was relatively straightforward — all the details can be found in the Integration guide. Before setting that up, I would highly recommend setting your TV's IP address as static in your router's DHCP settings.

Once set up, Home Assistant should look something like this.

Image showing the Sony Bravia device type in HomeAssistant

Now, this is the key bit that is easy to miss. Your TV can receive a multitude of remote commands, more than are on your remote. To find out these commands, the best way is to use the integration and send a "Test" command to the TV.

Image showing the script setup in HA

If you run that script you should see something like this in your Home Assistant Core logs.

Image showing the script setup in HA

Now you have a list of all the commands to fix your silly TV!

Fixing the soundbar issue

In my list of commands from Home Assistant there is one called "AudioOutput_AudioSystem". Sending this command forces the TV to select my soundbar when it fails to do so from time to time.

To ensure this happens automatically I set up an automation that, after the TV starts up, calls a script which sends that command.

Image showing the script to fix audio source

The automation looks like this. The 10 second delay is just to allow the TV to start some services so it doesn't ignore the request.

Image showing the script to fix audio source

Now this works for me — no more fumbling around the Sony interface to do what it should have done in the first place.

Switching the HDMI

I tend to only watch content from either my Apple TV or a YouView PVR connected over HDMI. For reasons I don't understand, the Apple TV, when started correctly, forces the TV to switch to that HDMI channel. However, the YouView box doesn't.

Switching the source is annoying using the Sony tv remote. To switch from my Apple TV to the YouView box I have to press the source button seven times, then OK — while dealing with input lag due to this TV's woeful performance. The fact they don't have HDMI select buttons but do have a Google Play button sums up how a business focus on profit over decent UX makes TVs terrible.

I digress. As above, I made two scripts that send the HDMI channel commands to the TV.

So now we have scripts that change the channel. But how to press the buttons?

Obviously I put them in a dashboard as a starting point.

HDMI buttons in a dashboard

But opening Home Assistant in an app or website is even slower than using the TV remote. So I opted to configure a single Aqara Zigbee button.

Then I mapped the button controls as follows:

showing the automation to link up the zigbee button press to the HDMI switch scripts

Conclusion

This is an admittedly extreme set of workarounds to get around issues I have with this TV. I'm really happy with the results, and naturally give massive thanks to the developers of Home Assistant and the integrations I've used here.

05/10/2025