From 0326e58c8a686273654b57a92a2257e1ea2ecc2c Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 5 Oct 2024 14:24:58 -0500 Subject: [PATCH] Remove automatic linkage of doorbells to HomeKit accessories via device class occupancy (#127668) --- homeassistant/components/homekit/__init__.py | 5 ----- tests/components/homekit/test_homekit.py | 1 - 2 files changed, 6 deletions(-) diff --git a/homeassistant/components/homekit/__init__.py b/homeassistant/components/homekit/__init__.py index 2fec1382766..b85308ffd66 100644 --- a/homeassistant/components/homekit/__init__.py +++ b/homeassistant/components/homekit/__init__.py @@ -167,7 +167,6 @@ BATTERY_SENSOR = (SENSOR_DOMAIN, SensorDeviceClass.BATTERY) MOTION_EVENT_SENSOR = (EVENT_DOMAIN, EventDeviceClass.MOTION) MOTION_SENSOR = (BINARY_SENSOR_DOMAIN, BinarySensorDeviceClass.MOTION) DOORBELL_EVENT_SENSOR = (EVENT_DOMAIN, EventDeviceClass.DOORBELL) -DOORBELL_BINARY_SENSOR = (BINARY_SENSOR_DOMAIN, BinarySensorDeviceClass.OCCUPANCY) HUMIDITY_SENSOR = (SENSOR_DOMAIN, SensorDeviceClass.HUMIDITY) @@ -1138,10 +1137,6 @@ class HomeKit: config[entity_id].setdefault( CONF_LINKED_DOORBELL_SENSOR, doorbell_event_entity_id ) - elif doorbell_binary_sensor_entity_id := lookup.get(DOORBELL_BINARY_SENSOR): - config[entity_id].setdefault( - CONF_LINKED_DOORBELL_SENSOR, doorbell_binary_sensor_entity_id - ) if domain == HUMIDIFIER_DOMAIN and ( current_humidity_sensor_entity_id := lookup.get(HUMIDITY_SENSOR) diff --git a/tests/components/homekit/test_homekit.py b/tests/components/homekit/test_homekit.py index ba8c1919e73..4000c61e422 100644 --- a/tests/components/homekit/test_homekit.py +++ b/tests/components/homekit/test_homekit.py @@ -2030,7 +2030,6 @@ async def test_homekit_finds_linked_motion_sensors( @pytest.mark.parametrize( ("domain", "device_class"), [ - ("binary_sensor", BinarySensorDeviceClass.OCCUPANCY), ("event", EventDeviceClass.DOORBELL), ], )