mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Disable less popular entities in devolo Home Control (#41945)
This commit is contained in:
parent
2604bf59ad
commit
e5eae22ad8
@ -82,6 +82,9 @@ class DevoloBinaryDeviceEntity(DevoloDeviceEntity, BinarySensorEntity):
|
|||||||
|
|
||||||
self._value = self._binary_sensor_property.state
|
self._value = self._binary_sensor_property.state
|
||||||
|
|
||||||
|
if element_uid.startswith("devolo.WarningBinaryFI:"):
|
||||||
|
self._enabled_default = False
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_on(self):
|
def is_on(self):
|
||||||
"""Return the state."""
|
"""Return the state."""
|
||||||
|
@ -21,6 +21,7 @@ class DevoloDeviceEntity(Entity):
|
|||||||
self._device_class = None
|
self._device_class = None
|
||||||
self._value = None
|
self._value = None
|
||||||
self._unit = None
|
self._unit = None
|
||||||
|
self._enabled_default = True
|
||||||
|
|
||||||
# This is not doing I/O. It fetches an internal state of the API
|
# This is not doing I/O. It fetches an internal state of the API
|
||||||
self._available = device_instance.is_online()
|
self._available = device_instance.is_online()
|
||||||
@ -60,6 +61,11 @@ class DevoloDeviceEntity(Entity):
|
|||||||
"model": self._model,
|
"model": self._model,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def entity_registry_enabled_default(self) -> bool:
|
||||||
|
"""Return if the entity should be enabled when first added to the entity registry."""
|
||||||
|
return self._enabled_default
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def should_poll(self):
|
def should_poll(self):
|
||||||
"""Return the polling state."""
|
"""Return the polling state."""
|
||||||
|
@ -110,6 +110,9 @@ class DevoloGenericMultiLevelDeviceEntity(DevoloMultiLevelDeviceEntity):
|
|||||||
if self._device_class is None:
|
if self._device_class is None:
|
||||||
self._name += f" {self._multi_level_sensor_property.sensor_type}"
|
self._name += f" {self._multi_level_sensor_property.sensor_type}"
|
||||||
|
|
||||||
|
if element_uid.startswith("devolo.VoltageMultiLevelSensor:"):
|
||||||
|
self._enabled_default = False
|
||||||
|
|
||||||
|
|
||||||
class DevoloBatteryEntity(DevoloMultiLevelDeviceEntity):
|
class DevoloBatteryEntity(DevoloMultiLevelDeviceEntity):
|
||||||
"""Representation of a battery entity within devolo Home Control."""
|
"""Representation of a battery entity within devolo Home Control."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user