Sony Bravia media player as Homekit television with source list

I’m trying to setup my Sony Bravia TV as a Homekit Television. Here is my configuration.

homekit.yaml

filter:
  include_entities:
    - media_player.tv
entity_config:
  media_player.tv:
    name: Televisie
    feature_list:
      - feature: on_off
      - feature: play_pause
      - feature: play_stop
      - feature: toggle_mute

tv.yaml (customizations)

media_player.tv: 
  friendly_name: Televisie
  icon: mdi:television
  device_class: tv
  source_list: [HDMI 1, HDMI 3]

It shows up as a Homekit television but I can’t get the source list to work. It stays empty. When I add source_list with an array of [HDMI 1, HDMI 3] it will show up as separated Homekit entities which doesn’t do anything.

Here are some screenshots for further explanation:




What am I doing wrong?

I had the same. Exclude your media player from HomeKit and restart Home Assistant so it will disappear completely from HomeKit. Then remove the exclusion and restart HA again. For me it solved the problem. Additionally I also removed the feature_list from the entity_config and it works without it. However I have a different TV.

1 Like

the above i removed. Then i quoted out the TV entity and config. Restarted HASS. After that included the tv. My config looks like this:

filter:
  include_entities:
    - switch.shenzhen_neo_electronics_co_ltd_wall_switch_2_channels_switch
    - media_player.tv
entity_config:
  media_player.tv:
    name: TV Slaapkamer
    feature_list:
      - feature: on_off

After a reboot it looked like this in the Apple Homekit. (iOS 13 beta):

Hopes it help

1 Like

Thank you so much @BFrijns and @A320Peter! I did what you both told me to do. I figured out the entity_config list isn’t even needed. I removed it and it is working.

1 Like

Thanks Maarten. I also removed the entity config. It is always nice to have as less config as needed :wink:
Works perfect.

1 Like

Interesting thread. So with a HomePod and IOS13 you can turn the TV on via Siri - Cool!
But how do you configure access to the TV? I have phillips tv, and have this in config:

media_player:
  - platform: philips_js
    host: <Ip address>

However, this “only” provides access to the “Android part” of the TV (i.e. Chromecast).
How do you gain access to the “TV”?, to e.g. switch between HDMI ports?

Via customizations add device_class: tv. This will turn it into a Homekit Television.

Here is my code (via github).

Hi - I already used your customization to make the TV appear in the Homekit. The button is there, but does not affect the TV.
What my question was - how do you “connect” to TV? I mean, don’t you need to enter IP address and other stuff in the configuration.yaml?
In other words: How does your system know what device media_player.tv is?

Ahh - Got it. Found this on your GitHub:

platform: braviatv
host: !secret media_player_tv_host
name: TV

I guess this is it?

No this is the part where I connect my Bravia TV as Media Player. See my previous comment. Thats the part where I register my TV as Homekit TV.

Hey - Thanks for staying with me… :grinning:
But, I am not sure I get it… Can you register your TV as a Homekit TV without having it connected as a media player?
In other words, is this the process?

  1. Connect the TV as media player (in configuration.yaml)
  2. Setup overall Homekit implementation (in configuration.yaml)
  3. Register the media player as homekit TV (in customization.yaml)
    or ??

The steps you described are correct.

Thanks - I am still puzzled… How is the TV in HomeKit connected to the “Media player TV”?
In other words: How is

platform: braviatv
host: !secret media_player_tv_host
name: TV

connected to

media_player.tv: 
  friendly_name: Televisie
  icon: mdi:television
  device_class: tv
  source_list: [HDMI 1, HDMI 3]

??

What is the key field between these? How does HomeKit know that “Televisie” is the Bravia TV??

Got it now (I think/hope).
media_player.tv is the entity ID given by HA when registering it as a media player.

That’s correct. The entity is is based on the name you give.

Hi thats interesting. Could you explain a couple of steps.
Where to put the customize thing? where to put the tv yaml. thanks

It’s messed up for my current configuration (with the new ios). I need to fix it again :slight_smile:.

Is there any way to add the apps like Netflix or hbo in this config?

Did you make it again after iOS update? I tried it but I failed. HomeKit does not show TV.
Bildschirmfoto 2020-03-02 um 17.32.07

1 Like