Sony Bravia TV component with Pre-Shared Key

on the remote there is the netflix button but I do not see it with this setting, is there a way to make netflix appear between the channels?

@emi check this post

great!!!
is it possible to have the pause play buttons etc … or to have some sort of remote control with lovelace or other? thank you

Yes definitely. You can use all options shown here https://github.com/custom-components/media_player.braviatv_psk/blob/master/custom_components/media_player/braviatv_psk.py#L44-L48.

I use the excellent Mini Media Player from @kalkih with some remote buttons which looks like this.

bravia_tv

Could you please post an example of Lovelace button configuration for Mini Media Player? I mean the string to call bravia tv component.

Here is the config. All options to use can be found in the link in my post above.

Edit: changed HDMI2 to source.

- type: custom:mini-media-player
  entity: media_player.sony_bravia_tv
  icon: 'mdi:television'
  hide:
    power_state: false
  volume_stateless: true
  shortcuts:
    hide_when_off: true
    buttons:
      - icon: mdi:numeric-1-box
        # name: NPO1
        type: tvshow
        id: Num1
      - icon: mdi:numeric-2-box
        type: tvshow
        id: Num2
      - icon: mdi:numeric-3-box
        type: tvshow
        id: Num3
      - icon: mdi:netflix
        type: source
        id: 'HDMI 2'
      - icon: mdi:play-circle
        type: tvshow
        id: Play
      - icon: mdi:pause-circle
        type: tvshow
        id: TvPause
      - icon: mdi:information
        type: tvshow
        id: Display
      - icon: mdi:television-guide
        type: tvshow
        id: EPG
2 Likes

I also use these options that I manually added.

I tried your code with my tv Sony: kdl_50w800c (model 2015 with android tv) and I follow your tutorial for install and setup on my tv.
But I only get the entity of my tv show on my Hass. I cannot control any function on my tv. I’m running hassbian. Can you help me?
here is configuration code:

media_player:
  - platform: braviatv_psk
    name: myBraviaTV
    host: 192.168.1.98
    psk: xxxx
    mac: xxxxx
    amp: True
    android: True
    sourcefilter:
      - ' HD'
      - HDMI

and here is my Lovelace code:

- type: media-control
        entity: media_player.mybraviatv_2

can you help?

what needs to be done to get this to work in .88?

I have it fixed on my dev system. Indeed some changes in 0.88 which means the component needs to be updated.
Will release a new version this evening.

1 Like

This is very interesting for me. Few questions before trying this.

Does this work on hass.io?
Is it possible to make scripts to change;

  • inputs
  • channels
  • volume

So i can make ifttt webhooks with google assistant to change things on the tv. This would be awsome.

I can answer all your questions with yes. So just give it a try :grinning:
Please check the posts above for any details on the scripts.

Just a general thing. Components like this work on hassio as that is just Home Assistant combined with some tools. Please read here for more info an hassio vs Home Assistant. Only add-ons are specially developed for hassio and don’t work on other HA installation methods.

Version 0.2.5 is available. That works with HA 0.88, but is also backwards compatible (at least it should be :wink:).

1 Like

Awsome and thanks for the info

can you give me an example of a script of a channel, for example channel 1?

There are 2 options.

script:
  tv_channel_1:
    sequence:
      - service: media_player.play_media
        data:
          entity_id: media_player.sony_bravia_tv
          media_content_type: tvshow
          media_content_id: Num1

Where media_content_id is one of the items below.

PLAY_MEDIA_OPTIONS = [
    'Num1', 'Num2', 'Num3', 'Num4', 'Num5', 'Num6', 'Num7', 'Num8', 'Num9',
    'Num0', 'Num11', 'Num12', 'Netflix', 'Red', 'Green', 'Yellow', 'Blue',
    'ChannelUp', 'ChannelDown', 'Up', 'Down', 'Left', 'Right', 'Display', 'Tv',
    'Confirm', 'Home', 'EPG', 'Return', 'Options', 'Exit', 'Teletext', 'Input',
    'TvPause', 'Play', 'Pause', 'Stop'
]

Second option

script:
  tv_channel_name_1:
    sequence:
      - service: media_player.select_source
        data:
          entity_id: media_player.sony_bravia_tv
          source: "NPO 1 HD"

Here is source the name of your channel which can be found in the attributes of the media player entity.

Check this post as well.
I guess there is enough info to be found in this topic :sunglasses:

The component works great but i get this when i load it.

Integrations need to be in their own folder. Change media_player/braviatv_psk.py to braviatv_psk/media_player.py. This will stop working soon.

14:24 loader.py (WARNING) - message first occured at 14:23 and shows up 4 times

1 Like

Hey @sbobergje, just do what HA has suggested you - rename the folder and also the file…At least that’s what I’ve done and it works fine.

I did exactly that and I’m still getting:

Configuration invalid
Platform not found: media_player.braviatv_psk
Platform not found: media_player.braviatv_psk

configuration

  - platform: braviatv_psk
    name: Living Room TV
    host: ip goes here
    psk: psk goes here
    mac: mac goes here
    amp: True
    android: True

Folders and file names
custom_components --> braviatv_psk --> media_player.py

1 Like