Mobile app to notify when sensor is disabled (#71561)
* Mobile app to notify when sensor is disabled * Add entity status to get_config * Allow overriding enabled/disabled
This commit is contained in:
parent
e4573273dc
commit
0b09376360
5 changed files with 162 additions and 13 deletions
|
@ -9,8 +9,8 @@ from homeassistant.helpers.restore_state import RestoreEntity
|
|||
|
||||
from .const import (
|
||||
ATTR_SENSOR_ATTRIBUTES,
|
||||
ATTR_SENSOR_DEFAULT_DISABLED,
|
||||
ATTR_SENSOR_DEVICE_CLASS,
|
||||
ATTR_SENSOR_DISABLED,
|
||||
ATTR_SENSOR_ENTITY_CATEGORY,
|
||||
ATTR_SENSOR_ICON,
|
||||
ATTR_SENSOR_STATE,
|
||||
|
@ -64,7 +64,7 @@ class MobileAppEntity(RestoreEntity):
|
|||
@property
|
||||
def entity_registry_enabled_default(self) -> bool:
|
||||
"""Return if entity should be enabled by default."""
|
||||
return not self._config.get(ATTR_SENSOR_DEFAULT_DISABLED)
|
||||
return not self._config.get(ATTR_SENSOR_DISABLED)
|
||||
|
||||
@property
|
||||
def device_class(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue