Hi everyone! I’d like to share a new custom integration I’ve been working on: Bravia REST API.
The existing bravia integration is quite limited. I wanted full access to everything Sony Bravia TVs expose via their REST API — IRCC infrared codes, app control, screen management, Wake-on-LAN and more — so I built this from scratch.
What it does
Exposes the full Sony Bravia REST API as native Home Assistant entities:
Media Player — power, volume (absolute + step), source selection mixing HDMI inputs and Android apps
Remote — send any IRCC command by name (VolumeUp, Home, Back…) or raw base64 code
Buttons — one-tap actions: Blank Screen, Picture On, Reboot, Close Apps, and all directional/navigation IR buttons
Tested on a KD-65XH9096 running firmware 5.7.0. Should work on any Bravia with PSK support, though some features depend on the model. If you try it on a different model I’d love to hear how it goes — feedback and PRs welcome!
does your integration do remote and app launching differently from the official one? those features already exist and function the same way as your as far as i can tell
Hi @cmos486 Thanks for the integration, it will definitely make automating our TV easier. Just a quick question.. I’m not sure if this is a bug, but it’s likely an issue with how the entity names, and ids are generated.
After adding the TV, I named the device "Sony Bravia Rest API" instead of the default model code. The names for the remote entities are correct, but for some of the others, it seems a bit confusing to me. See the screenshot.
select.sony_bravia_rest_api_5
- name: Sony Bravia Rest Api
- icon: mdi:brightness-6
select.sony_bravia_rest_api_4
- name: Sony Bravia Rest Api
- icon: mdi:timer-outline
switch.sony_bravia_rest_api_2
- name: Sony Bravia Rest Api
- icon: mdi:power-plug
select.sony_bravia_rest_api_3
- name: Sony Bravia Rest Api
- icon: mdi:image-filter-hdr
select.sony_bravia_rest_api_2
- name: Sony Bravia Rest Api
- icon: mdi:screen-rotation
switch.sony_bravia_rest_api
- name: Sony Bravia Rest Api
- icon: mdi:led-on
sensor.sony_bravia_rest_api_4
- name: Sony Bravia Rest Api
- icon: mdi:ethernet
sensor.sony_bravia_rest_api_3
- name: Sony Bravia Rest Api
- icon: mdi:identifier
sensor.sony_bravia_rest_api_2
- name: Sony Bravia Rest Api
- icon: mdi:chip
sensor.sony_bravia_rest_api
- name: Sony Bravia Rest Api
- icon: mdi:television
select.sony_bravia_rest_api
- name: Sony Bravia Rest Api
- icon: mdi:speaker
number.sony_bravia_rest_api
- name: Sony Bravia Rest Api
- icon: mdi:brightness-6
button.sony_bravia_rest_api_remote_input
- name: Sony Bravia Rest Api Remote: Input
- icon: mdi:import
button.sony_bravia_rest_api_remote_stop
- name: Sony Bravia Rest Api Remote: Stop
- icon: mdi:stop
button.sony_bravia_rest_api_remote_pause
- name: Sony Bravia Rest Api Remote: Pause
- icon: mdi:pause
button.sony_bravia_rest_api_remote_play
- name: Sony Bravia Rest Api Remote: Play
- icon: mdi:play
button.sony_bravia_rest_api_remote_netflix
- name: Sony Bravia Rest Api Remote: Netflix
- icon: mdi:netflix
button.sony_bravia_rest_api_remote_channel_down
- name: Sony Bravia Rest Api Remote: Channel Down
- icon: mdi:arrow-down-bold
button.sony_bravia_rest_api_remote_channel_up
- name: Sony Bravia Rest Api Remote: Channel Up
- icon: mdi:arrow-up-bold
button.sony_bravia_rest_api_remote_mute
- name: Sony Bravia Rest Api Remote: Mute
- icon: mdi:volume-mute
button.sony_bravia_rest_api_remote_volume_down
- name: Sony Bravia Rest Api Remote: Volume Down
- icon: mdi:volume-minus
button.sony_bravia_rest_api_remote_volume_up
- name: Sony Bravia Rest Api Remote: Volume Up
- icon: mdi:volume-plus
button.sony_bravia_rest_api_remote_options
- name: Sony Bravia Rest Api Remote: Options
- icon: mdi:dots-vertical
button.sony_bravia_rest_api_remote_ok
- name: Sony Bravia Rest Api Remote: OK
- icon: mdi:checkbox-marked-circle
button.sony_bravia_rest_api_remote_right
- name: Sony Bravia Rest Api Remote: Right
- icon: mdi:chevron-right
button.sony_bravia_rest_api_remote_left
- name: Sony Bravia Rest Api Remote: Left
- icon: mdi:chevron-left
button.sony_bravia_rest_api_remote_down
- name: Sony Bravia Rest Api Remote: Down
- icon: mdi:chevron-down
button.sony_bravia_rest_api_remote_up
- name: Sony Bravia Rest Api Remote: Up
- icon: mdi:chevron-up
button.sony_bravia_rest_api_remote_back
- name: Sony Bravia Rest Api Remote: Back
- icon: mdi:arrow-left
button.sony_bravia_rest_api_remote_home
- name: Sony Bravia Rest Api Remote: Home
- icon: mdi:home
button.sony_bravia_rest_api_4
- name: Sony Bravia Rest Api
- icon: mdi:monitor
button.sony_bravia_rest_api_3
- name: Sony Bravia Rest Api
- icon: mdi:monitor-off
button.sony_bravia_rest_api_2
- name: Sony Bravia Rest Api
- icon: mdi:close-box-multiple
button.sony_bravia_rest_api
- name: Sony Bravia Rest Api
- icon: mdi:restart
remote.sony_bravia_rest_api_remote
- name: Sony Bravia Rest Api Remote
- icon: none
media_player.sony_bravia_rest_api
- name: Sony Bravia Rest Api
- icon: none
Hi! Thanks for reporting this — you're right, it was a bug.
The issue was that entities relying on translation_key for their names weren't getting them resolved properly in HACS custom components, so they all fell back to just the device name with numeric suffixes. The IRCC buttons worked because they
had explicit name attributes.
Fixed in v1.5.1 — added explicit name fallbacks on all affected entities (selects, switches, sensors, buttons, number) and created a proper translations/en.json file.
After updating, you'll likely need to remove and re-add the integration for the entity IDs to regenerate correctly (e.g., select.sony_bravia_rest_api_sound_output instead of select.sony_bravia_rest_api_2). Alternatively, you can rename them
manually in Settings → Devices & Services → Entities.
Thanks again for the detailed report — the screenshot made it very easy to diagnose!
And I cannot get this integration to work (also not the build in SONY Bravia integration). There seems to be an issue with the Authentification with the PSK (it says that there is an invalid key).
However when I check with my macbook if I can connect via PSK and https, it works. Google Chromecast and Android Remote is also working.
I am trying for some time now w/o success. I did not find someone with similar issues though in the web. AI help was also very limited.
Could someone please help me here.
Thank you!
We’ve identified a likely cause: the integration was hardcoded to HTTP only, but newer consumer Bravia TVs like the Bravia 5 may serve the REST API over HTTPS — which matches
your observation that HTTPS works from your Mac.
We’ve just released v1.5.8 with the following fixes:
HTTPS auto-detection — the setup flow now tries HTTP first, then automatically falls back to HTTPS (with self-signed certificate support)
PSK whitespace stripping — a trailing space in the PSK field would also cause “invalid key”
HTTP 401 handling — some newer models return 401 instead of 403 for auth failures
To update: go to HACS → Integrations → Bravia REST API → Update, then restart Home Assistant and try adding the TV again.
If it still doesn’t work, these steps will help us debug:
Enable debug logging — add to your configuration.yaml:
Thanks for the new release 16.0 and the ability to set polling interval, is possible to have a polling set for when the TV is On and one for when its in standby to save on network traffic?
Yes, absolutely! This is now available in v1.7.0 which I just released.
You can now configure two separate polling intervals in the integration options:
Setting
Description
Default
Max
Refresh Interval (TV On)
Polling rate when the TV is active
15s
60s
Refresh Interval (Standby)
Polling rate when the TV is off
60s
300s
The integration automatically switches between the two based on the TV’s power state. So you can keep fast updates while watching (e.g. 10s) and a much slower rate in standby
(e.g. 120s) to save on network traffic.
Just update via HACS and go to the integration’s Configure options to set it up. Thanks for the great suggestion!