Homekit new options TV Source

It didn’t get attention here Homekit TV

So I want to try it here again. Would be glad if someone transforms it to a pull request, as I didn’t know which branch to choose.

Looks like there are new options in homekit.

For Instance choosing the channel of a tv. I think this isn’t implemented in ha yet.

I think those option would be nice for the homekit component too.

See:

I was wondering about that too. I think someone will probably do it at some point but I believe this is only possible in the iOS 12.x beta right?

It usually takes the right person who can actually code it to have the need for it and then it happens. I believe someone already made a homebridge version for LG’s WebOS tv’s so if you have one of those you can try that.

I agree. Let’s see what the future brings us.

Don’t have a LG.

I 1000% want this. Unfortunately I don’t have the time or energy to write it myself because I’ve been wanting to contribute to HA. Damn job!

Yes, there is a project on Github for this, but it is just for Homebridge it makes Harmony activities act as inputs. But the code is written in JavaScript and HA uses python. Homebridge in HA is no longer supported so we will have to wait until someone that is much smarter then me feels the need to add this. I personally am very excited about this component my fingers are crossed it’s sooner then later!

Are they any plans to support HomeKit TV soon? :smiling_face_with_three_hearts:

Apple hasn’t officially released the spcifications for it, yet. The Homebridge implementation is based on reverse engineering a leaked version in an iOS 12.2 beta image and thus could still break if they want to change something.

If Apple releases something official, we’ll see how and when we can implement it. Until then, I hope that answer helps.

3 Likes

Any news on this?

Apparently LG stated that pre-2019 WebOS TVs won’t support the new HomeKit integration, but there’s an online petition to sign.

In the meantime I have my money on @cdce8p to make it happen in HA!

I’m working on getting this PR merged in the underlying HomeKit library HomeAssistant uses. Once that is merged, I’ll submit a PR from this branch to HomeAssistant. Documentation here.

I have it working for these features: on_off, play_pause, select_source, toggle_mute, and volume_step.

I am planning on expanding the functionality in the future to link a remote from HomeAssistant to a particular media_player that’s represented as a TV in the Home app. It seems some functionality is split between the Home app and the Remote app. I think what I’ve got so far is a good MVP.

7 Likes

Updates:

  • The HAP-python PR mentioned above was merged and released as part of HAP-python version 2.5.0

  • Home Assistant was updated to use HAP-python version 2.5.0 in this PR

  • @adrum opened a PR to add HomeKit Television support to Home Assistant via HAP-python version 2.5.0 and another PR to update the docs. These PRs are still in-review.

3 Likes

Thanks for your work @smockle @adrum!

Yea, I’m so very glad you came here! I was losing hope! I did have your component kinda working on Homebridge using a separate rpi. But never got full use out of it! I can’t wait for this! Thanks so much for your impressive work!

Update: We are making some traction on the PR and have set a goal to have this functionality in the next major HA release. I will update this thread if anything changes.

5 Likes

Really looking forward to this for ages. I currently have a Harmony remote, I assume I’ll need to make me a “virtual” media player to attach the two? Instructions to make the media player are here: https://www.home-assistant.io/components/universal/

If anyone already has a good template for Harmony feel free to share :slight_smile:

This has been officially merged! It will be in the next major release. Thanks to @cdce8p for his patience with me during the review process.

7 Likes

You guys… :heart_eyes:

Added the Universal example code and set the device_class to tv,… but it doesn’t show up in HomeKit. Can anyone share some sample code? I’m probably doing something wrong here… trying to get my Harmony remote in HomeKit :stuck_out_tongue:

- platform: universal
name: Test Universal
children:
  - media_player.living_room_cast
  - media_player.living_room_kodi
commands:
  turn_on:
    service: switch.turn_on
    data:
      entity_id: switch.living_room_tv
  turn_off:
    service: switch.turn_off
    data:
      entity_id: switch.living_room_tv
  volume_up:
    service: switch.turn_on
    data:
      entity_id: switch.living_room_volume_up
  volume_down:
    service: switch.turn_on
    data:
      entity_id: switch.living_room_volume_down
  volume_mute:
    service: switch.turn_on
    data:
      entity_id: switch.living_room_mute
  select_source:
    service: media_player.select_source
    data_template:
      entity_id: media_player.receiver
      source: '{{ source }}'
  volume_set:
    service: media_player.volume_set
    data_template:
      entity_id: media_player.receiver
      volume_level: '{{ volume_level }}'

attributes:
  state: switch.living_room_tv
  is_volume_muted: switch.living_room_mute
  volume_level: media_player.receiver|volume_level
  source: media_player.receiver|source
  source_list: media_player.receiver|source_list

Edit: had to add this to customize.yaml

    media_player.test_universal:
       device_class: tv

Has this been added to 93.0?

I see that there is a mention in the blog under beta fixes. Does anybody have this configured and working? Any examples would be appreciated. I’m wanting to integrate this with my Harmony Hub scripts and switches. Thanks :slight_smile:

This has been added to 0.93. I have confirmed it working on my universal media player. If you’re running into issues with it not showing up in HomeKit, please read the troubleshooting documentation here:

The device_class: tv must be set. Also, if it’s been previously added as a series of switches in HomeKit before, it must be excluded from HomeKit, then included again before it will show up as a television accessory.