Sony Bravia TV sources/channels in HomeKit issue

With the recent changes to the Sony Bravia TV integration in 2023.2, I can no longer change channels in HomeKit. How do I add the channels as sources so they are selectable under the TV in HomeKit?

I used to be able to set a customize option for the entity under the customize: section where I can list out the sources or channels that I want. After the recent changes, the sources show up in the list in HomeKit, but I cannot switch to any of them except for the external sources like HDMI1, HDMI2, Video 1, etc. I believe this has to do with the channels now listed under the “Browse Media” or media sources for the TV entity as well as the change in service calls and how to address media sources because these same sources error out with a “failed to call, no source found by that name” error if they are in the dropdown list of the standard media player Lovelace card. But I can change channels and sources of the TV from Home Assistant through service calls or browsing media/channels. I cannot select or change any channels of the TV in HomeKit. The TV is setup in the HomeKit integration in accessory mode and the media player is of device class type TV (both as required and laid out in the documentation).

On a side note, I have one source on the TV that is named “HDMI 2/MHL”. Home Assistant properly interprets this source name and escapes the forward slash, but the HomeKit integration does not. The HomeKit integration converts the forward slash to a hyphen for display, but also when calling services so it is sent as “HDMI 2-MHL”. However, the integration doesn’t know of a source named that and therefore I cannot switch to that source in HomeKit. I can switch to it in Home Assistant.

I have the same problem.
I don’t think this is a HomeKit problem though.
I used to be able to select channels with

  service: media_player.select_source
  service_data:
    entity_id: media_player.sony_kd_65x89j
    source: TLC HD

Now the only way seems to be to go into the player, click ‘browse’ then ‘channels’ then the channel.
Before the change, all the channels were in the source list of the bravia integration media_player entity.
Now they are in the browse section.
The problem is now I can not find an appropriate service to select the channels.

This is how my home theater control page looks like:

Left side is for audio and the right side is for TV.
All of my channels stopped working :frowning:

However, I found the solution:

service: media_player.play_media
data:
  media_content_id: "TLC HD"
  media_content_type: channel
target:
  entity_id: media_player.sony_kd_65x89j

Even though, the services tab in the developer section creates the above code it does not work in a entity-button or a custom:button-card and the code has to be like the following:

  service: media_player.play_media
  service_data:
    entity_id: media_player.sony_kd_65x89j
    media_content_id: 'TLC HD'
    media_content_type: channel

I hope this helps someone.

1 Like

I forgot I posted here about this. I filed an issue on GitHub and someone posted a workaround for HomeKit. There are other issues and it sounds like the root cause is the fundamental change in how media sources and channels are handled in HA, but also the way the Sony Bravia integration sets up sources.