Polish tplink vacuum sensors (#137355)
parent
d7f0a55568
commit
14034ed7f8
|
@ -135,13 +135,17 @@ SENSOR_DESCRIPTIONS: tuple[TPLinkSensorEntityDescription, ...] = (
|
|||
TPLinkSensorEntityDescription(
|
||||
key="clean_area",
|
||||
device_class=SensorDeviceClass.AREA,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
TPLinkSensorEntityDescription(
|
||||
entity_registry_enabled_default=False,
|
||||
key="clean_progress",
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
TPLinkSensorEntityDescription(
|
||||
key="last_clean_time",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
suggested_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
convert_fn=_TOTAL_SECONDS_METHOD_CALLER,
|
||||
|
@ -155,20 +159,26 @@ SENSOR_DESCRIPTIONS: tuple[TPLinkSensorEntityDescription, ...] = (
|
|||
device_class=SensorDeviceClass.TIMESTAMP,
|
||||
),
|
||||
TPLinkSensorEntityDescription(
|
||||
entity_registry_enabled_default=False,
|
||||
key="total_clean_time",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
suggested_unit_of_measurement=UnitOfTime.MINUTES,
|
||||
convert_fn=_TOTAL_SECONDS_METHOD_CALLER,
|
||||
),
|
||||
TPLinkSensorEntityDescription(
|
||||
entity_registry_enabled_default=False,
|
||||
key="total_clean_area",
|
||||
device_class=SensorDeviceClass.AREA,
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
),
|
||||
TPLinkSensorEntityDescription(
|
||||
key="total_clean_count",
|
||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||
),
|
||||
TPLinkSensorEntityDescription(
|
||||
entity_registry_enabled_default=False,
|
||||
key="main_brush_remaining",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
|
@ -176,6 +186,7 @@ SENSOR_DESCRIPTIONS: tuple[TPLinkSensorEntityDescription, ...] = (
|
|||
convert_fn=_TOTAL_SECONDS_METHOD_CALLER,
|
||||
),
|
||||
TPLinkSensorEntityDescription(
|
||||
entity_registry_enabled_default=False,
|
||||
key="main_brush_used",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
|
@ -183,6 +194,7 @@ SENSOR_DESCRIPTIONS: tuple[TPLinkSensorEntityDescription, ...] = (
|
|||
convert_fn=_TOTAL_SECONDS_METHOD_CALLER,
|
||||
),
|
||||
TPLinkSensorEntityDescription(
|
||||
entity_registry_enabled_default=False,
|
||||
key="side_brush_remaining",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
|
@ -190,6 +202,7 @@ SENSOR_DESCRIPTIONS: tuple[TPLinkSensorEntityDescription, ...] = (
|
|||
convert_fn=_TOTAL_SECONDS_METHOD_CALLER,
|
||||
),
|
||||
TPLinkSensorEntityDescription(
|
||||
entity_registry_enabled_default=False,
|
||||
key="side_brush_used",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
|
@ -197,6 +210,7 @@ SENSOR_DESCRIPTIONS: tuple[TPLinkSensorEntityDescription, ...] = (
|
|||
convert_fn=_TOTAL_SECONDS_METHOD_CALLER,
|
||||
),
|
||||
TPLinkSensorEntityDescription(
|
||||
entity_registry_enabled_default=False,
|
||||
key="filter_remaining",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
|
@ -204,6 +218,7 @@ SENSOR_DESCRIPTIONS: tuple[TPLinkSensorEntityDescription, ...] = (
|
|||
convert_fn=_TOTAL_SECONDS_METHOD_CALLER,
|
||||
),
|
||||
TPLinkSensorEntityDescription(
|
||||
entity_registry_enabled_default=False,
|
||||
key="filter_used",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
|
@ -211,6 +226,7 @@ SENSOR_DESCRIPTIONS: tuple[TPLinkSensorEntityDescription, ...] = (
|
|||
convert_fn=_TOTAL_SECONDS_METHOD_CALLER,
|
||||
),
|
||||
TPLinkSensorEntityDescription(
|
||||
entity_registry_enabled_default=False,
|
||||
key="sensor_remaining",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
|
@ -218,6 +234,7 @@ SENSOR_DESCRIPTIONS: tuple[TPLinkSensorEntityDescription, ...] = (
|
|||
convert_fn=_TOTAL_SECONDS_METHOD_CALLER,
|
||||
),
|
||||
TPLinkSensorEntityDescription(
|
||||
entity_registry_enabled_default=False,
|
||||
key="sensor_used",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
|
@ -225,6 +242,7 @@ SENSOR_DESCRIPTIONS: tuple[TPLinkSensorEntityDescription, ...] = (
|
|||
convert_fn=_TOTAL_SECONDS_METHOD_CALLER,
|
||||
),
|
||||
TPLinkSensorEntityDescription(
|
||||
entity_registry_enabled_default=False,
|
||||
key="charging_contacts_remaining",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
|
@ -232,6 +250,7 @@ SENSOR_DESCRIPTIONS: tuple[TPLinkSensorEntityDescription, ...] = (
|
|||
convert_fn=_TOTAL_SECONDS_METHOD_CALLER,
|
||||
),
|
||||
TPLinkSensorEntityDescription(
|
||||
entity_registry_enabled_default=False,
|
||||
key="charging_contacts_used",
|
||||
device_class=SensorDeviceClass.DURATION,
|
||||
native_unit_of_measurement=UnitOfTime.SECONDS,
|
||||
|
|
|
@ -243,7 +243,9 @@
|
|||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
|
@ -279,6 +281,7 @@
|
|||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'area',
|
||||
'friendly_name': 'my_device Cleaning area',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfArea.SQUARE_METERS: 'm²'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
|
@ -294,11 +297,13 @@
|
|||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'disabled_by': <RegistryEntryDisabler.INTEGRATION: 'integration'>,
|
||||
'domain': 'sensor',
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'sensor.my_device_cleaning_progress',
|
||||
|
@ -322,20 +327,6 @@
|
|||
'unit_of_measurement': '%',
|
||||
})
|
||||
# ---
|
||||
# name: test_states[sensor.my_device_cleaning_progress-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'my_device Cleaning progress',
|
||||
'unit_of_measurement': '%',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.my_device_cleaning_progress',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '30',
|
||||
})
|
||||
# ---
|
||||
# name: test_states[sensor.my_device_cleaning_time-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
|
@ -801,7 +792,9 @@
|
|||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
|
@ -1426,7 +1419,9 @@
|
|||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
|
@ -1462,7 +1457,9 @@
|
|||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
|
@ -1495,7 +1492,9 @@
|
|||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
|
|
Loading…
Reference in New Issue