Make zwave_js last seen sensor enabled by default (#109191)
* Make zwave_js last seen sensor enabled by default * Add test * Fix test * improve tests
This commit is contained in:
parent
08f8f84f61
commit
2b525ed2e9
5 changed files with 48 additions and 19 deletions
|
@ -343,6 +343,7 @@ class ZWaveJSStatisticsSensorEntityDescription(SensorEntityDescription):
|
|||
convert: Callable[
|
||||
[ControllerStatisticsDataType | NodeStatisticsDataType, str], Any
|
||||
] = lambda statistics, key: statistics.get(key)
|
||||
entity_registry_enabled_default: bool = False
|
||||
|
||||
|
||||
# Controller statistics descriptions
|
||||
|
@ -487,6 +488,7 @@ ENTITY_DESCRIPTION_NODE_STATISTICS_LIST = [
|
|||
else None
|
||||
)
|
||||
),
|
||||
entity_registry_enabled_default=True,
|
||||
),
|
||||
]
|
||||
|
||||
|
@ -930,7 +932,6 @@ class ZWaveStatisticsSensor(SensorEntity):
|
|||
entity_description: ZWaveJSStatisticsSensorEntityDescription
|
||||
_attr_should_poll = False
|
||||
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
||||
_attr_entity_registry_enabled_default = False
|
||||
_attr_has_entity_name = True
|
||||
|
||||
def __init__(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue