Problem with Homekit YAML Configuration


Hi, i hope this is the right place to ask! My configuration was working perfectly until recently, I dont see how entity config is invalid.

My guess is that you accidentally indented something in your config. Post your HomeKit config here and the issues will likely be obvious. Just be sure to post them between the three hash marks so it is readable (i.e., `):

Like this

sorry if i am not doing this correctly, i am new to this

homekit:
  - filter:
      include_entities:
        - light.cabinet_strip
        - light.under_desk_strip
        - light.desk_strip
        - light.led_strip_bed
        - light.vocolinc_l3_1770d8
        - light.vocolinc_l3_1770dc
        - binary_sensor.pir_sensor
        - switch.subwoofer_socket
        - switch.loungelamp_socket
        - light.lounge_wall_lamp_1
        - switch.loungelavalamp
        - light.lounge_under_window_cill
        - camera.doorbell_camera_sd
        - switch.porch_outside_light_switch
        - binary_sensor.upstairs_hall_pir
        - media_player.sky_q_bedroom
    entity_config:
      media_player.sky_q_bedroom:
        device_class: tv

i wouldnt normally use YAML for homekit but the ui integration wouldnt let me edit it

Device class isn’t valid in the config. You are reading the docs as something that needs to go into YAML, when it’s saying that the device in HA must be of the class TV when you add it to HomeKit so that you get the controls.

homekit:
  - filter:
      include_entities:
        - light.cabinet_strip
        - light.under_desk_strip
        - light.desk_strip
        - light.led_strip_bed
        - light.vocolinc_l3_1770d8
        - light.vocolinc_l3_1770dc
        - binary_sensor.pir_sensor
        - switch.subwoofer_socket
        - switch.loungelamp_socket
        - light.lounge_wall_lamp_1
        - switch.loungelavalamp
        - light.lounge_under_window_cill
        - camera.doorbell_camera_sd
        - switch.porch_outside_light_switch
        - binary_sensor.upstairs_hall_pir
        - media_player.sky_q_bedroom

    entity_config:
      media_player.sky_q_bedroom:
        name: Bedroom TV
1 Like

as mentioned before, device_class: is not a valid entry for the HomeKit YAML config. I’m guessing you added your TV (media player entity) to HomeKit so you could control it from the app or Siri. You need to use the customize section to define the device class of the media player entity. Like this: (this is pseudo-code, but shows the layout of what I believe you’re wanting to do)

homeassistant:
  customize:
    media_player.sky_q_bedroom:
      device_class: TV
      source_list:
        - ...

Also, you will need to add the media player (TV) to HomeKit through a separate HomeKit bridge either through the UI configuration or in YAML in order for things to work properly and for it to actually show up as a TV in the Home app. It’s easiest to use the UI in that case because the bridge needs to be set in accessory mode which allows just a single entity (or multiple entities of same integration type like media_player) to appear with full functionality.

1 Like

Thank you very much, this worked and has completely fixed my problem!

1 Like

As @squirtbrnr mentioned, you will get nagged to have separate instances of HomeKit for your media players and cameras and locks. It’s only a warning and right now doesn’t really seem to cause any problems, but I suspect when there is a warning then breakage is in the future!

These devices need to be accessories rather than a bridge.

1 Like

Thank you for this, I will try it in the morning (UK) and will let you know how I get on

Hello,

sorry, but I do not quite understand. Do I need to switch homekit to accessory mode to have my Samsung TV or Enigma receiver show up as a TV in homekit? How do I create a new instance? What happens to the old instance?

Thanks