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 <joostlek@outlook.com>

* Update homeassistant/components/motionblinds_ble/sensor.py

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Use entity_registry_enabled_by_default fixture for tests

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
Lenn 2024-08-18 17:14:05 +02:00 committed by GitHub
parent 55cf3b60eb
commit 4e7e896601
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View File

@ -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,
),
)

View File

@ -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"),