diff --git a/homeassistant/components/huawei_lte/binary_sensor.py b/homeassistant/components/huawei_lte/binary_sensor.py index 9966b9cc5f5..a1a26b51657 100644 --- a/homeassistant/components/huawei_lte/binary_sensor.py +++ b/homeassistant/components/huawei_lte/binary_sensor.py @@ -52,15 +52,12 @@ async def async_setup_entry( class HuaweiLteBaseBinarySensor(HuaweiLteBaseEntityWithDevice, BinarySensorEntity): """Huawei LTE binary sensor device base class.""" + _attr_entity_registry_enabled_default = False + key: str = field(init=False) item: str = field(init=False) _raw_state: str | None = field(default=None, init=False) - @property - def entity_registry_enabled_default(self) -> bool: - """Return if the entity should be enabled when first added to the entity registry.""" - return False - @property def _device_unique_id(self) -> str: return f"{self.key}.{self.item}" @@ -106,6 +103,7 @@ class HuaweiLteMobileConnectionBinarySensor(HuaweiLteBaseBinarySensor): """Huawei LTE mobile connection binary sensor.""" _attr_name: str = field(default="Mobile connection", init=False) + _attr_entity_registry_enabled_default = True def __post_init__(self) -> None: """Initialize identifiers.""" @@ -135,11 +133,6 @@ class HuaweiLteMobileConnectionBinarySensor(HuaweiLteBaseBinarySensor): """Return mobile connectivity sensor icon.""" return "mdi:signal" if self.is_on else "mdi:signal-off" - @property - def entity_registry_enabled_default(self) -> bool: - """Return if the entity should be enabled when first added to the entity registry.""" - return True - @property def extra_state_attributes(self) -> dict[str, Any] | None: """Get additional attributes related to connection status."""