Homekit new options TV Source

I don’t think any integration with Harmony is possible at this point. Harmony is a remote and not a media_player. There is no media_player template and the universal template requires existing media_player…

Easiest option is probably to rework the Harmony component so it can also be used as a media_player?

I have a pretty bare bones integration working on a universal media_player without an existing media_player. In theory, I don’t see why you wouldn’t be able to get it working using the remote commands for the Harmony with a similar setup as below.

  - platform: universal
    name: living_room_tv_universal
    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: shell_command.living_room_tv_volume_up
      volume_down:
        service: shell_command.living_room_tv_volume_down
      volume_mute:
        service: shell_command.living_room_tv_volume_mute

    attributes:
      state: switch.living_room_tv
      is_volume_muted: switch.living_room_muted

I plan to add source selection when I figure out how to make a custom component for my television.

Aww, wasn’t aware this was possible. The documentation and other forum posts suggested it’s only for combining media players.

In the meantime I took your template and have it working in HomeKit :tada::tada::tada:
Use is fairly limited at the moment it seems, I can turn the TV on and off but there is no feature_list to change the channel or something. Pause and Play buttons are not supported by Universal template?

EDIT: changing the volume works, when you are in the “remote” app you can control the volume using the physical buttons on the iphone.

I was about to tell you the remote app has support for volume control. What’s weird is there is no mute button, but Siri can mute it for you. If your media_player supports changing inputs, it should show those as well.

This go around was more an MVP. I’m exploring how to link a remote to media_player to add the rest of the remote app functionality.

1 Like

Just tried to get the tv added into homekit, but my configuration check says it is not supported to add a device class for the media_player.

2019-05-18 09:45:32 WARNING (MainThread) [homeassistant.helpers.config_validation] Your configuration contains extra keys that the platform does not support.
Please remove [device_class].  (See /config/media_players.yaml, line 1).
Offending data: {"platform": "webostv", "device_class": "tv", "host": "<redacted>", "name": "Bedroom TV", "filename": "<redacted>", "timeout": "<redacted>", "turn_on_action": "<redacted>"}

Running HassIO 93.1 currrently.

How where you able to add this device class?
Tried it on a different media_player, but got the same error.

This is the configuration which is throwing the error:

# LG WebOS
- platform: webostv
  device_class: tv
  host: xxx.xxx.xxx.xxx
  name: Bedroom TV

@imaikel device_class: tv must be set in the customize section for the entity.

1 Like

Hi all, I set up my LG webOS TV and I can see it in HomeKit but no inputs are available though my configuration has them included in the media player section, also no sound control is available. Can anyone help?

That did the trick, thanks!

I’m still fooling around with this. Running 12.3 on my iPhone, HA 0.93.

How do you change volume? It’s not in the Home app nor in the “remote” app.

I have two media_player entities exposed to HomeKit. One is a SmartIR (old broadlink component) media_player and one is a universal_media_player.

The SmartIR television shows up in the “remote” app, I am assuming because it has “play and pause” supported features based on a cursory read of the code (is this CHAR_REMOTE_KEY?)

The Universal player does not show there, I assume because I don’t have play/pause defined in the commands section.

Both have volume up and down settings, but I cannot see where to adjust volume anywhere.

OK, kind of figured it out after reading some posts… you have to be in the “remote app” to control volume, but a media_player won’t show in the remote app unless the play or pause feature is supported by that media_player. Should it also be shown in the remote app if it only supports volume?

Noticed also that Homekit supports directional input now but HA doesn’t seem to have a way to handle this. Added this for architecture discussion

@adrum and @cdce8p for vis

1 Like

I also don’t have the volume buttons in “home”. Within homeassistant it is possible to control the volume of that mediaplayer.

I have the device_class set to “tv”.

Does someone have volumecontrol working in the home app?

BTW I also don’t have sources. I can press source in the home app but no sources in there.

According to the documentation, there is no volume control in the Home app. You can control the volume only in remove app, using the volume buttons of your phone. This works for me, but no other controls are working in the Remote app, which is pretty inconvenient to open the Remote app only to control the volume.

im getting a error when adding volume_step

homekit:
  auto_start: false
  filter:
  #  include_domains:
  #    - media_player
    include_entities: !include include_entities.yaml
  entity_config:
    media_player.playstation_4:
      feature_list:
        - feature: on_off
    media_player.vizio:
      feature_list:
        - feature: on_off
        - feature: volume_step
    media_player.samsung:
      feature_list:
        - feature: on_off
    media_player.sanyo:
      feature_list:
        - feature: on_off
        - feature: volume_step

Invalid config for [homekit]: value is not allowed for dictionary value @ data[‘homekit’][‘entity_config’][‘feature’]. Got None. (See /config/configuration.yaml, line 201). Please check the docs at https://home-assistant.io/components/homekit/

Did I set this up correct?

So the final implementation does not factor any entity_config options. All that’s needed is setting the device_class: tv In the customize section of the Home Assistant config and the code will figure out what features are supported by the media_player.

Thank You! I’ll keep my fingers crossed support for harmony gets integrated eventually. It would save me from reaching my 100 entity limit from my Home Assistant bridge :slight_smile:

Why do you have that limit?

yes, the ha TV is added automatically in the remote app, no steps were required for that

Strange I don’t have it in the remote app

The HomeKit component only allows 100 entities per instance. To get 100 more a more I would need a 2nd server to run a differently named bridge. I’m sure this is a limit placed by apple for 3rd party support.

1 Like