mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 14:27:07 +00:00
Disable less used entities by default in MotionMount integration (#138509)
* Mark sensors as disabled by default as most users won't need them * Mark entity-disabled-by-default as done * Enable disabled entities during tests
This commit is contained in:
parent
4d3a4015ed
commit
f407dbd35c
@ -33,6 +33,7 @@ class MotionMountMovingSensor(MotionMountEntity, BinarySensorEntity):
|
|||||||
_attr_device_class = BinarySensorDeviceClass.MOVING
|
_attr_device_class = BinarySensorDeviceClass.MOVING
|
||||||
_attr_translation_key = "motionmount_is_moving"
|
_attr_translation_key = "motionmount_is_moving"
|
||||||
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
||||||
|
_attr_entity_registry_enabled_default = False
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, mm: motionmount.MotionMount, config_entry: MotionMountConfigEntry
|
self, mm: motionmount.MotionMount, config_entry: MotionMountConfigEntry
|
||||||
|
@ -58,7 +58,7 @@ rules:
|
|||||||
comment: Single device per config entry
|
comment: Single device per config entry
|
||||||
entity-category: done
|
entity-category: done
|
||||||
entity-device-class: done
|
entity-device-class: done
|
||||||
entity-disabled-by-default: todo
|
entity-disabled-by-default: done
|
||||||
entity-translations: done
|
entity-translations: done
|
||||||
exception-translations: done
|
exception-translations: done
|
||||||
icon-translations: todo
|
icon-translations: todo
|
||||||
|
@ -49,6 +49,7 @@ class MotionMountErrorStatusSensor(MotionMountEntity, SensorEntity):
|
|||||||
]
|
]
|
||||||
_attr_translation_key = "motionmount_error_status"
|
_attr_translation_key = "motionmount_error_status"
|
||||||
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
||||||
|
_attr_entity_registry_enabled_default = False
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self, mm: motionmount.MotionMount, config_entry: MotionMountConfigEntry
|
self, mm: motionmount.MotionMount, config_entry: MotionMountConfigEntry
|
||||||
|
@ -14,6 +14,7 @@ from tests.common import MockConfigEntry
|
|||||||
MAC = bytes.fromhex("c4dd57f8a55f")
|
MAC = bytes.fromhex("c4dd57f8a55f")
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.usefixtures("entity_registry_enabled_by_default")
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("system_status", "state"),
|
("system_status", "state"),
|
||||||
[
|
[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user