HomeKit entities show up, then disappear

I’ve had a rock solid Homekit integration for a year or so. Recently after upgrading to 0.104.3 I started getting funky behavior. All climate and input_boolean devices show up fine in HomeKit, but the lights, switches, and media players all show up for a moment (enough that it walks me through adding them to rooms, etc), but then within 30-60 seconds, they all just vanish. Like I say, the climate and input_boolean devices stick around just fine.

Has anyone else experienced this? I’ll next start removing all entities and re-adding, since my guess is one in particular may now be problematic.

Homekit config:

homekit:
  filter:
    include_entities:
      - climate.nursery
      - input_boolean.houseguests_here
      - light.nursery_lamp
      - light.back_door_light_14
      - light.basement_lights_15
      - light.office_lamp_74
      - fan.bedroom_fan
      - light.bedroom_lights_32
      - light.dining_room_light_13
      - light.front_door_light_9
      - light.gym_lights_27
      - light.kitchen_island_lights_8
      - light.kitchen_lights_7
      - light.living_room_lights_6
      - light.nursery_light_10
      - light.office_lights_26
      - input_boolean.turn_turntable_in_living_room
      - light.fence_lights_18
      - light.patio_lights_16
      - light.outside_christmas_lights_22
      - light.living_room_lamp_73
      - media_player.living_room_receiver
      - switch.homekit_vacuum_main
      - switch.homekit_vacuum_bedroom
      - switch.homekit_vacuum_basement
      - switch.christmas_tree_48
  entity_config:
    switch.homekit_vacuum_basement:
      linked_battery_sensor: sensor.homekit_vacuum_basement_battery
    switch.homekit_vacuum_main:
      linked_battery_sensor: sensor.homekit_vacuum_main_battery
    switch.homekit_vacuum_bedroom:
      linked_battery_sensor: sensor.homekit_vacuum_bedroom_battery

Debug output (nothing seems to be going wrong here at all). You can see me toggling an input boolean successfully from the Home app at the end.

2020-01-27 08:35:00 DEBUG (MainThread) [homeassistant.components.homekit] Begin setup HomeKit
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "input_boolean.turn_turntable_in_living_room" as "Switch"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "climate.nursery" as "Thermostat"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "input_boolean.houseguests_here" as "Switch"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "media_player.living_room_receiver" as "TelevisionMediaPlayer"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Added source AUX.
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Added source AppleTV.
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Added source Bluetooth.
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Added source Favorites.
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Added source Internet Radio.
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Added source Media Server.
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Added source Online Music.
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Added source Pandora.
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Added source Server.
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Added source SiriusXM.
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Added source Sonos.
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Added source Spotify.
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Added source Tuner.
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Added source Turntable.
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Added source iPod/USB.
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "fan.bedroom_fan" as "Fan"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "switch.homekit_vacuum_bedroom" as "Switch"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.accessories] switch.homekit_vacuum_bedroom: Found battery level
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "switch.homekit_vacuum_basement" as "Switch"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.accessories] switch.homekit_vacuum_basement: Found battery level
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "switch.homekit_vacuum_main" as "Switch"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit.accessories] switch.homekit_vacuum_main: Found battery level
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.office_lamp_74" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.bedroom_lights_32" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.office_lights_26" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.nursery_lamp" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.back_door_light_14" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.living_room_lamp_73" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.gym_lights_27" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.outside_christmas_lights_22" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.dining_room_light_13" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.fence_lights_18" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.living_room_lights_6" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.kitchen_lights_7" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "switch.christmas_tree_48" as "Switch"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.kitchen_island_lights_8" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.nursery_light_10" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.front_door_light_9" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.patio_lights_16" as "Light"
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Add "light.basement_lights_15" as "Light"
2020-01-27 08:35:31 INFO (SyncWorker_10) [homeassistant.components.homekit.util] Pincode: xxx-xx-xxxx
2020-01-27 08:35:31 DEBUG (SyncWorker_10) [homeassistant.components.homekit] Driver start
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state input_boolean.turn_turntable_in_living_room=off; editable=False, friendly_name=Turntable, icon=mdi:speaker @ 2020-01-27T08:35:01.277530-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state climate.nursery=heat; hvac_modes=['cool', 'heat', 'off'], min_temp=45, max_temp=95, current_temperature=68, temperature=67, hvac_action=idle, friendly_name=Nursery, supported_features=1 @ 2020-01-27T08:35:01.277861-08:00>
2020-01-27 08:35:32 DEBUG (SyncWorker_11) [homeassistant.components.homekit.type_switches] input_boolean.turn_turntable_in_living_room: Set current state to False
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state input_boolean.houseguests_here=off; editable=False, friendly_name=Houseguests?, icon=mdi:account-clock @ 2020-01-27T08:35:01.771982-08:00>
2020-01-27 08:35:32 DEBUG (SyncWorker_3) [homeassistant.components.homekit.type_switches] input_boolean.houseguests_here: Set current state to False
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state media_player.living_room_receiver=on; source_list=['AUX', 'AppleTV', 'Bluetooth', 'Favorites', 'Internet Radio', 'Media Server', 'Online Music', 'Pandora', 'Server', 'SiriusXM', 'Sonos', 'Spotify', 'Tuner', 'Turntable', 'iPod/USB'], sound_mode_list=['MUSIC', 'MOVIE', 'GAME', 'AUTO', 'STANDARD', 'VIRTUAL', 'MATRIX', 'ROCK ARENA', 'JAZZ CLUB', 'VIDEO GAME', 'MONO MOVIE', 'DIRECT', 'PURE DIRECT', 'DOLBY DIGITAL', 'DTS SURROUND', 'MCH STEREO', 'STEREO', 'ALL ZONE STEREO'], volume_level=0.46, is_volume_muted=False, media_content_type=channel, media_title=AppleTV, source=AppleTV, sound_mode=DOLBY DIGITAL, sound_mode_raw=Dolby Surround, friendly_name=Living Room Receiver, supported_features=69004, device_class=tv @ 2020-01-27T08:35:02.042286-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state fan.bedroom_fan=off; speed_list=['off', 'low', 'medium', 'high'], speed=off, friendly_name=Bedroom Fan, supported_features=1 @ 2020-01-27T08:35:02.699143-08:00>
2020-01-27 08:35:32 DEBUG (SyncWorker_19) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Set current active state to True
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state switch.homekit_vacuum_bedroom=off; friendly_name=Bedroom Vacuum, hidden=True @ 2020-01-27T08:35:02.789096-08:00>
2020-01-27 08:35:32 DEBUG (SyncWorker_19) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Set current mute state to False
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state switch.homekit_vacuum_basement=off; friendly_name=Basement Vacuum, hidden=True @ 2020-01-27T08:35:02.789962-08:00>
2020-01-27 08:35:32 DEBUG (SyncWorker_15) [homeassistant.components.homekit.type_switches] switch.homekit_vacuum_bedroom: Set current state to False
2020-01-27 08:35:32 DEBUG (SyncWorker_17) [homeassistant.components.homekit.accessories] switch.homekit_vacuum_bedroom: Updated battery level to 100
2020-01-27 08:35:32 DEBUG (SyncWorker_19) [homeassistant.components.homekit.type_media_players] media_player.living_room_receiver: Set current input to AppleTV
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state switch.homekit_vacuum_main=off; friendly_name=Main Vacuum, hidden=True @ 2020-01-27T08:35:02.790233-08:00>
2020-01-27 08:35:32 DEBUG (SyncWorker_4) [homeassistant.components.homekit.type_switches] switch.homekit_vacuum_basement: Set current state to False
2020-01-27 08:35:32 DEBUG (SyncWorker_13) [homeassistant.components.homekit.accessories] switch.homekit_vacuum_basement: Updated battery level to 100
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.office_lamp_74=off; Vera Device Id=74, friendly_name=Office Lamp, supported_features=1 @ 2020-01-27T08:35:02.864928-08:00>
2020-01-27 08:35:32 DEBUG (SyncWorker_8) [homeassistant.components.homekit.type_switches] switch.homekit_vacuum_main: Set current state to False
2020-01-27 08:35:32 DEBUG (SyncWorker_14) [homeassistant.components.homekit.accessories] switch.homekit_vacuum_main: Updated battery level to 100
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.bedroom_lights_32=on; brightness=255, Vera Device Id=32, friendly_name=Bedroom Lights, supported_features=1 @ 2020-01-27T08:35:02.874012-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.office_lights_26=off; Vera Device Id=26, friendly_name=Gym Lights, supported_features=1 @ 2020-01-27T08:35:02.940113-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.nursery_lamp=off; friendly_name=Nursery Lamp, supported_features=41 @ 2020-01-27T08:35:02.953980-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.back_door_light_14=on; Vera Device Id=14, friendly_name=Back Door Light, supported_features=1 @ 2020-01-27T08:35:02.960795-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.living_room_lamp_73=on; brightness=255, Vera Device Id=73, friendly_name=Living Room Lamp, supported_features=1 @ 2020-01-27T08:35:02.963927-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.gym_lights_27=off; Vera Device Id=27, friendly_name=Jackson’s Room Lights, supported_features=1 @ 2020-01-27T08:35:02.966373-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.outside_christmas_lights_22=off; Vera Device Id=22, friendly_name=Outside Christmas Lights, supported_features=1 @ 2020-01-27T08:35:02.969348-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.dining_room_light_13=off; Vera Device Id=13, friendly_name=Dining Room Light, supported_features=1 @ 2020-01-27T08:35:02.972375-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.fence_lights_18=off; Vera Device Id=18, friendly_name=Fence Lights, supported_features=1 @ 2020-01-27T08:35:02.977248-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.living_room_lights_6=off; Vera Device Id=6, friendly_name=Living Room Lights, supported_features=1 @ 2020-01-27T08:35:02.979320-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.kitchen_lights_7=on; Vera Device Id=7, friendly_name=Kitchen Lights, supported_features=1 @ 2020-01-27T08:35:02.981382-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state switch.christmas_tree_48=off; Vera Device Id=48, friendly_name=Christmas Tree @ 2020-01-27T08:35:02.982859-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.kitchen_island_lights_8=off; Vera Device Id=8, friendly_name=Kitchen Island Lights, supported_features=1 @ 2020-01-27T08:35:02.986361-08:00>
2020-01-27 08:35:32 DEBUG (SyncWorker_0) [homeassistant.components.homekit.type_switches] switch.christmas_tree_48: Set current state to False
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.nursery_light_10=off; Vera Device Id=10, friendly_name=Nursery Light, supported_features=1 @ 2020-01-27T08:35:02.988380-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.front_door_light_9=on; Vera Device Id=9, friendly_name=Front Door Light, supported_features=1 @ 2020-01-27T08:35:02.990353-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.patio_lights_16=off; device_armed=False, Vera Device Id=16, friendly_name=Patio Lights, supported_features=1 @ 2020-01-27T08:35:02.992668-08:00>
2020-01-27 08:35:32 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state light.basement_lights_15=off; Vera Device Id=15, friendly_name=Basement Lights, supported_features=1 @ 2020-01-27T08:35:02.998223-08:00>
2020-01-27 08:39:29 DEBUG (Thread-8) [homeassistant.components.homekit.type_switches] input_boolean.houseguests_here: Set switch state to 1
2020-01-27 08:39:29 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state input_boolean.houseguests_here=on; editable=False, friendly_name=Houseguests?, icon=mdi:account-clock @ 2020-01-27T08:39:29.083687-08:00>
2020-01-27 08:39:48 DEBUG (Thread-8) [homeassistant.components.homekit.type_switches] input_boolean.houseguests_here: Set switch state to 0
2020-01-27 08:39:48 DEBUG (MainThread) [homeassistant.components.homekit.accessories] New_state: <state input_boolean.houseguests_here=off; editable=False, friendly_name=Houseguests?, icon=mdi:account-clock @ 2020-01-27T08:39:48.913247-08:00>

I experienced something similar, and it was related to my media_player entity (which it looks like you have). There’s an incompatibility with non-iOS13 devices that causes everything to disappear from Homekit. See the issue below for details. I resolved it by making sure that ALL my devices (any device anywhere that interacts with Homekit) was iOS13.

You beat me to it! The first deviced I removed was the media_player and of course everything worked afterward. Coincidentally, the same day I upgraded to 0.104.3, I pulled an ancient iPad mini 2 out of a drawer to reset/wipe. I suppose that is the culprit. Thanks for linking to the issue!