Sony Bravia TV component with Pre-Shared Key

Hi, I have the same problem too. how did you solve it?

I have a TV lift of a sort so I have the TV retract when turned off. To fix this problem, I set HA to wait till its been turned off for 30 secs and then it retracts. This prevents false offs when the TV retracting it.

Yes I was, sorry I just saw this.

this is great, I just added this script and it works perfectly. Is there somewhere I can dig to find other actions I may be able to add with similar scripts? (i.e. starting Prime Video, Hulu or other applications built into the TV)?

Is it possible to use this on hass.io?

I’d like to say yes. I’m not sure with the way hass.io is setup. I install manually using pip in a venv.

Since my changes are a fork of the two dependencies: braviarc, braviatv, I drop braviatv in custom_components and braviarc simply a file overwrite of the installed one. :man_shrugging:

BTW, this is currently useless with Harmony Hub based remotes on recent fw 206:

Why is this useless with Harmony Hubs? I guess a better question is what would you do with this that you would do with this via HA that you would not just do with the remote?

Maybe I’m undervaluing what can be done with this. I would use it to start android TV apps, via automations, or start a lighting scene depending on input, etc. Those would not require the harmony hub integration.

I am familiar with the harmony api issue (I have one and have blocked the update for now), and I have a sony TV, and have used the api for the sony in the past, but really mostly just to monitor if it was on/off, and maybe to change an input.

With the hub integration disabled, HA cannot read the remote’s current activity, therefore, disabling any automation (input fed by harmony hub) to launch an app on Bravia Android TV.

Yes, the Bravia TV integration with HA still works, including launching apps.

1 Like

Got it, So instead of using the remote to select an app, you might use this integration to create an automation and then tie that to a simple click based on harmony state. An easier way to just start plex for example?

Right. I have a “dumb” activity on remote named “Plex”. It turns on TV (no input) and Amp (TV input), then HA sees activity “Plex” and launches the app via bravia api. The buttons on the remote are mapped accordingly for whatever is best per the activity/device.

1 Like

@gerard33 with your custom component and the netflix script you posted I dug through the bravia_psk.py file to see what other scripts I might be able to make and have recreated all of the basic remote commands. see…
https://hastebin.com/yocadixuzu.css

what I’m trying to do now is create a custom lovelace card as a remote control for the bravia tv. if you or anyone would like to help me please feel free to message me.

I have use the latest of your braviatv_psk. It is support lovelace tracker. How to add in to check custom_updater?

Is the example below correct?

custom_updater:
  show_installable: false
  hide_sensor: false
  track:
    - components
    - cards
#    - python_scripts
  component_urls:
    - https://github.com/custom-components/media_player.braviatv_psk/blob/master/custom_components/media_player/braviatv_psk.py

Your - python_scripts needs to line up with cards and components

Thank you. And do I need the url? Or just put python_script?

Thanks in advance.

I’ll have the remote control card for the Bravia custom component finished tomorrow, but I could use some help in figuring out how to share it with the community.

You can add extra commands over here. I don’t have an Android TV version so I can only use the Netflix app command. Not sure if commands for other apps are ready to be used by this component.
There is a list with all available commands which are working with my component. Just let me know if you want that list.

Cool :slight_smile: Easiest way is to share it via Github. Just let us know how we can help.

The Bravia component is part of the special Github site for custom components, so you don’t have to specify the component_urls.

Thank you.

is this a custom component or a lovelace card? Will it resolve the issue where my config just doesn’t seem to be working at all? I know that’s kind of vague. I went though the config and got my pin but the HA component still says off even though the tv is on. I have restarted HA multiple times and turned the TV on and off manually a couple of times. I have two Bravia TVs and would like to get this working for both.

It’s a component.
I would suggest to install and try the component. Your issue seems a bit like the one I had with the PIN component, so give it a shot.