From 4e7e896601a58c4a2084ae85a07d2f58041d60ce Mon Sep 17 00:00:00 2001 From: Lenn <78048721+LennP@users.noreply.github.com> Date: Sun, 18 Aug 2024 17:14:05 +0200 Subject: [PATCH] Disable entities for Motiontionblinds Bluetooth (#124159) * Set entity_registry_enabled_default to False for RSSI sensor * Use entity description * Update homeassistant/components/motionblinds_ble/sensor.py Co-authored-by: Joost Lekkerkerker * Update homeassistant/components/motionblinds_ble/sensor.py Co-authored-by: Joost Lekkerkerker * Use entity_registry_enabled_by_default fixture for tests --------- Co-authored-by: Joost Lekkerkerker --- homeassistant/components/motionblinds_ble/sensor.py | 1 + tests/components/motionblinds_ble/test_sensor.py | 1 + 2 files changed, 2 insertions(+) diff --git a/homeassistant/components/motionblinds_ble/sensor.py b/homeassistant/components/motionblinds_ble/sensor.py index fbab5d06251..aa0f5ef7c90 100644 --- a/homeassistant/components/motionblinds_ble/sensor.py +++ b/homeassistant/components/motionblinds_ble/sensor.py @@ -89,6 +89,7 @@ SENSORS: tuple[MotionblindsBLESensorEntityDescription, ...] = ( native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT, register_callback_func=lambda device: device.register_signal_strength_callback, value_func=lambda value: value, + entity_registry_enabled_default=False, ), ) diff --git a/tests/components/motionblinds_ble/test_sensor.py b/tests/components/motionblinds_ble/test_sensor.py index 54d2fbcb064..c2468b876ae 100644 --- a/tests/components/motionblinds_ble/test_sensor.py +++ b/tests/components/motionblinds_ble/test_sensor.py @@ -24,6 +24,7 @@ from . import setup_integration from tests.common import MockConfigEntry +@pytest.mark.usefixtures("entity_registry_enabled_by_default") @pytest.mark.parametrize("blind_type", [MotionBlindType.CURTAIN]) @pytest.mark.parametrize( ("sensor", "register_callback", "initial_value", "args", "expected_value"),