Homekit integration stopped working after customizing

I created a universal TV remote (media_player) but when it shows up in HomeKit it is only the power function/button, no sources. I see the sources when i use the media_player in Lovelace.

I searched and found i need to add “device_class: tv” ad the entitie (my universal remote). I did that, restarted couple times. No changes. So i cheched the Customizing in config and there i saw a error. I needed to add homeassistant: customize: !include customize.yaml

When i do that.The error is gone, but the whole Homekit is down… all stuff is unavaillable ;-(

So what am i doing wrong?

configuration.yaml:

default_config:

tts:
  - platform: google_translate

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

sensor:
  - platform: systemmonitor
    resources:
      - type: disk_use_percent
        arg: /home
      - type: disk_use
        arg: /home
      - type: disk_free
        arg: /home
      - type: memory_free
      - type: memory_use_percent
      - type: memory_use
      - type: processor_use
      - type: processor_temperature
      - type: last_boot
      
media_player:
  - platform: ziggo_mediabox_xl
    host: 192.168.178.65
    name: Ziggo Mediabox


  - platform: universal
    name: Televisie
    children:
      - media_player.ziggo_mediabox
    commands:
      turn_on:
        service: input_boolean.turn_on
        data:
          entity_id: input_boolean.tv
      turn_off:
        service: input_boolean.turn_off
        data:
          entity_id: input_boolean.tv
      volume_up:
        service: switch.turn_on
        data:
          entity_id: switch.tv_volume_up
      volume_down:
        service: switch.turn_on
        data:
          entity_id: switch.tv_volume_down
      select_source:
        service: media_player.select_source
        data:
          entity_id: media_player.ziggo_mediabox
          source: '{{ source }}'

    attributes:
      state: input_boolean.tv
      source: media_player.test_universal|source
      source_list: media_player.ziggo_mediabox|source_list

customize.yaml:

media_player.televisie:
  device_class: tv

I don’t see this in your condiguration.yaml

homeassistant:
  customize: !include customize.yaml

my bad. I removed it, so i can switch my lights with Siri again :wink: i placed it below default_config:

default_config:
homeassistant:
  customize: !include customize.yaml
tts:
  - platform: google_translate

And customize.yaml is in the same directory as configuration.yaml?

i found this in the error log:

2020-12-07 12:56:24 WARNING (SyncWorker_6) [homeassistant.components.homekit.type_media_players] media_player.televisie: Sources out of sync. Restart Home Assistant
2020-12-07 12:56:25 WARNING (MainThread) [homeassistant.components.homekit.type_media_players] media_player.televisie: Sources out of sync. Restart Home Assistant

but maybe this was when i created and tested the media_player.television

yes

I use 1 HomeKit integration as a bridge. I excluded the media_player.televisie from that bridge. Now all stuff is working again. So there is something wrong in mu “universal” player in the yaml file?

Next 1 created a 2nd HomeKit integration and set it as accesory… selected “media_player” and next the right player. When i try to pare with the home app on my iphone i get a msg that the TV is not certified for HomeKit, but that should not be a problem. After i enter the code i get a msg “Connecting to TV” and a msg the pairing did not work. (accessory does not meet the standard)

I removed:

      source: media_player.ziggo_mediabox|source
      source_list: media_player.ziggo_mediabox|source_list

The player will pair and shows up in HomeKit, But only with the power button, no sources, no volume up or down.

I don’t use Homekit, can’t help you. Only able to help you with customize.

No problem :wink:

i will first try to get the sources function working and when that is working i will try to embed/use/integrate the sources provided with the media_player.ziggo_mediabox

i now tried this, but no sources shows up. So… i will try some other codes :roll_eyes:

      select_source:
        service: media_player.select_source
        data:
          entity_id: media_player.ziggo_mediabox
          source: 'NPO 1, NPO 2'

It is working now.

  - platform: universal
    name: Televisie
    children:
      - media_player.ziggo_mediabox
    commands:
      turn_on:
        service: input_boolean.turn_on
        data:
          entity_id: input_boolean.tv
      turn_off:
        service: input_boolean.turn_off
        data:
          entity_id: input_boolean.tv
      volume_up:
        service: switch.turn_on
        data:
          entity_id: switch.tv_volume_up
      volume_down:
        service: switch.turn_on
        data:
          entity_id: switch.tv_volume_down
      select_source:
        service: media_player.select_source
        data:
          entity_id: media_player.ziggo_mediabox
          source: '{{ source }}'
    attributes:
      state: input_boolean.tv
      source: input_select.tv_zenders|state
      source_list: input_select.tv_zenders|options