Improve Ecovacs naming (#109372)
parent
a6c697c80f
commit
343086a6c8
|
@ -47,13 +47,13 @@
|
|||
"name": "Relocate"
|
||||
},
|
||||
"reset_lifespan_brush": {
|
||||
"name": "Reset brush lifespan"
|
||||
"name": "Reset main brush lifespan"
|
||||
},
|
||||
"reset_lifespan_filter": {
|
||||
"name": "Reset filter lifespan"
|
||||
},
|
||||
"reset_lifespan_side_brush": {
|
||||
"name": "Reset side brush lifespan"
|
||||
"name": "Reset side brushes lifespan"
|
||||
}
|
||||
},
|
||||
"image": {
|
||||
|
@ -79,13 +79,13 @@
|
|||
}
|
||||
},
|
||||
"lifespan_brush": {
|
||||
"name": "Brush lifespan"
|
||||
"name": "Main brush lifespan"
|
||||
},
|
||||
"lifespan_filter": {
|
||||
"name": "Filter lifespan"
|
||||
},
|
||||
"lifespan_side_brush": {
|
||||
"name": "Side brush lifespan"
|
||||
"name": "Side brushes lifespan"
|
||||
},
|
||||
"network_ip": {
|
||||
"name": "IP address"
|
||||
|
@ -100,7 +100,7 @@
|
|||
"name": "Area cleaned"
|
||||
},
|
||||
"stats_time": {
|
||||
"name": "Time cleaned"
|
||||
"name": "Cleaning duration"
|
||||
},
|
||||
"total_stats_area": {
|
||||
"name": "Total area cleaned"
|
||||
|
@ -109,12 +109,12 @@
|
|||
"name": "Total cleanings"
|
||||
},
|
||||
"total_stats_time": {
|
||||
"name": "Total time cleaned"
|
||||
"name": "Total cleaning duration"
|
||||
}
|
||||
},
|
||||
"select": {
|
||||
"water_amount": {
|
||||
"name": "Water amount",
|
||||
"name": "Water flow level",
|
||||
"state": {
|
||||
"high": "High",
|
||||
"low": "Low",
|
||||
|
@ -137,7 +137,7 @@
|
|||
"name": "Advanced mode"
|
||||
},
|
||||
"carpet_auto_fan_boost": {
|
||||
"name": "Carpet auto fan speed boost"
|
||||
"name": "Carpet auto-boost suction"
|
||||
},
|
||||
"clean_preference": {
|
||||
"name": "Clean preference"
|
||||
|
|
|
@ -42,49 +42,6 @@
|
|||
'state': '2024-01-01T00:00:00+00:00',
|
||||
})
|
||||
# ---
|
||||
# name: test_buttons[yna5x1][button.ozmo_950_reset_brush_lifespan:entity-registry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': None,
|
||||
'config_entry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'button',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'button.ozmo_950_reset_brush_lifespan',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Reset brush lifespan',
|
||||
'platform': 'ecovacs',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'reset_lifespan_brush',
|
||||
'unique_id': 'E1234567890000000001_reset_lifespan_brush',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_buttons[yna5x1][button.ozmo_950_reset_brush_lifespan:state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Ozmo 950 Reset brush lifespan',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'button.ozmo_950_reset_brush_lifespan',
|
||||
'last_changed': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '2024-01-01T00:00:00+00:00',
|
||||
})
|
||||
# ---
|
||||
# name: test_buttons[yna5x1][button.ozmo_950_reset_filter_lifespan:entity-registry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
|
@ -128,7 +85,7 @@
|
|||
'state': '2024-01-01T00:00:00+00:00',
|
||||
})
|
||||
# ---
|
||||
# name: test_buttons[yna5x1][button.ozmo_950_reset_side_brush_lifespan:entity-registry]
|
||||
# name: test_buttons[yna5x1][button.ozmo_950_reset_main_brush_lifespan:entity-registry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
|
@ -140,7 +97,7 @@
|
|||
'disabled_by': None,
|
||||
'domain': 'button',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'button.ozmo_950_reset_side_brush_lifespan',
|
||||
'entity_id': 'button.ozmo_950_reset_main_brush_lifespan',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
|
@ -150,7 +107,50 @@
|
|||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Reset side brush lifespan',
|
||||
'original_name': 'Reset main brush lifespan',
|
||||
'platform': 'ecovacs',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'reset_lifespan_brush',
|
||||
'unique_id': 'E1234567890000000001_reset_lifespan_brush',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_buttons[yna5x1][button.ozmo_950_reset_main_brush_lifespan:state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Ozmo 950 Reset main brush lifespan',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'button.ozmo_950_reset_main_brush_lifespan',
|
||||
'last_changed': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '2024-01-01T00:00:00+00:00',
|
||||
})
|
||||
# ---
|
||||
# name: test_buttons[yna5x1][button.ozmo_950_reset_side_brushes_lifespan:entity-registry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': None,
|
||||
'config_entry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'button',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'button.ozmo_950_reset_side_brushes_lifespan',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Reset side brushes lifespan',
|
||||
'platform': 'ecovacs',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
|
@ -159,13 +159,13 @@
|
|||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_buttons[yna5x1][button.ozmo_950_reset_side_brush_lifespan:state]
|
||||
# name: test_buttons[yna5x1][button.ozmo_950_reset_side_brushes_lifespan:state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Ozmo 950 Reset side brush lifespan',
|
||||
'friendly_name': 'Ozmo 950 Reset side brushes lifespan',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'button.ozmo_950_reset_side_brush_lifespan',
|
||||
'entity_id': 'button.ozmo_950_reset_side_brushes_lifespan',
|
||||
'last_changed': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '2024-01-01T00:00:00+00:00',
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# serializer version: 1
|
||||
# name: test_selects[yna5x1-entity_ids0][select.ozmo_950_water_amount:entity-registry]
|
||||
# name: test_selects[yna5x1-entity_ids0][select.ozmo_950_water_flow_level:entity-registry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
|
@ -18,7 +18,7 @@
|
|||
'disabled_by': None,
|
||||
'domain': 'select',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'select.ozmo_950_water_amount',
|
||||
'entity_id': 'select.ozmo_950_water_flow_level',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
|
@ -28,7 +28,7 @@
|
|||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Water amount',
|
||||
'original_name': 'Water flow level',
|
||||
'platform': 'ecovacs',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
|
@ -37,10 +37,10 @@
|
|||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_selects[yna5x1-entity_ids0][select.ozmo_950_water_amount:state]
|
||||
# name: test_selects[yna5x1-entity_ids0][select.ozmo_950_water_flow_level:state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Ozmo 950 Water amount',
|
||||
'friendly_name': 'Ozmo 950 Water flow level',
|
||||
'options': list([
|
||||
'low',
|
||||
'medium',
|
||||
|
@ -49,7 +49,7 @@
|
|||
]),
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'select.ozmo_950_water_amount',
|
||||
'entity_id': 'select.ozmo_950_water_flow_level',
|
||||
'last_changed': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'ultrahigh',
|
||||
|
|
|
@ -88,7 +88,7 @@
|
|||
'state': '100',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_brush_lifespan:entity-registry]
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_cleaning_duration:entity-registry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
|
@ -99,37 +99,41 @@
|
|||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'sensor.ozmo_950_brush_lifespan',
|
||||
'entity_category': None,
|
||||
'entity_id': 'sensor.ozmo_950_cleaning_duration',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'name': None,
|
||||
'options': dict({
|
||||
'sensor.private': dict({
|
||||
'suggested_unit_of_measurement': <UnitOfTime.MINUTES: 'min'>,
|
||||
}),
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_device_class': <SensorDeviceClass.DURATION: 'duration'>,
|
||||
'original_icon': None,
|
||||
'original_name': 'Brush lifespan',
|
||||
'original_name': 'Cleaning duration',
|
||||
'platform': 'ecovacs',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'lifespan_brush',
|
||||
'unique_id': 'E1234567890000000001_lifespan_brush',
|
||||
'unit_of_measurement': '%',
|
||||
'translation_key': 'stats_time',
|
||||
'unique_id': 'E1234567890000000001_stats_time',
|
||||
'unit_of_measurement': <UnitOfTime.MINUTES: 'min'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_brush_lifespan:state]
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_cleaning_duration:state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Ozmo 950 Brush lifespan',
|
||||
'unit_of_measurement': '%',
|
||||
'device_class': 'duration',
|
||||
'friendly_name': 'Ozmo 950 Cleaning duration',
|
||||
'unit_of_measurement': <UnitOfTime.MINUTES: 'min'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.ozmo_950_brush_lifespan',
|
||||
'entity_id': 'sensor.ozmo_950_cleaning_duration',
|
||||
'last_changed': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '80',
|
||||
'state': '5.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_error:entity-registry]
|
||||
|
@ -263,7 +267,7 @@
|
|||
'state': '192.168.0.10',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_side_brush_lifespan:entity-registry]
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_main_brush_lifespan:entity-registry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
|
@ -275,7 +279,7 @@
|
|||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'sensor.ozmo_950_side_brush_lifespan',
|
||||
'entity_id': 'sensor.ozmo_950_main_brush_lifespan',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
|
@ -285,29 +289,29 @@
|
|||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Side brush lifespan',
|
||||
'original_name': 'Main brush lifespan',
|
||||
'platform': 'ecovacs',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'lifespan_side_brush',
|
||||
'unique_id': 'E1234567890000000001_lifespan_side_brush',
|
||||
'translation_key': 'lifespan_brush',
|
||||
'unique_id': 'E1234567890000000001_lifespan_brush',
|
||||
'unit_of_measurement': '%',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_side_brush_lifespan:state]
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_main_brush_lifespan:state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Ozmo 950 Side brush lifespan',
|
||||
'friendly_name': 'Ozmo 950 Main brush lifespan',
|
||||
'unit_of_measurement': '%',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.ozmo_950_side_brush_lifespan',
|
||||
'entity_id': 'sensor.ozmo_950_main_brush_lifespan',
|
||||
'last_changed': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '40',
|
||||
'state': '80',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_time_cleaned:entity-registry]
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_side_brushes_lifespan:entity-registry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
|
@ -318,41 +322,37 @@
|
|||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_id': 'sensor.ozmo_950_time_cleaned',
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'sensor.ozmo_950_side_brushes_lifespan',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'name': None,
|
||||
'options': dict({
|
||||
'sensor.private': dict({
|
||||
'suggested_unit_of_measurement': <UnitOfTime.MINUTES: 'min'>,
|
||||
}),
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.DURATION: 'duration'>,
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Time cleaned',
|
||||
'original_name': 'Side brushes lifespan',
|
||||
'platform': 'ecovacs',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'stats_time',
|
||||
'unique_id': 'E1234567890000000001_stats_time',
|
||||
'unit_of_measurement': <UnitOfTime.MINUTES: 'min'>,
|
||||
'translation_key': 'lifespan_side_brush',
|
||||
'unique_id': 'E1234567890000000001_lifespan_side_brush',
|
||||
'unit_of_measurement': '%',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_time_cleaned:state]
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_side_brushes_lifespan:state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'duration',
|
||||
'friendly_name': 'Ozmo 950 Time cleaned',
|
||||
'unit_of_measurement': <UnitOfTime.MINUTES: 'min'>,
|
||||
'friendly_name': 'Ozmo 950 Side brushes lifespan',
|
||||
'unit_of_measurement': '%',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.ozmo_950_time_cleaned',
|
||||
'entity_id': 'sensor.ozmo_950_side_brushes_lifespan',
|
||||
'last_changed': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '5.0',
|
||||
'state': '40',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_total_area_cleaned:entity-registry]
|
||||
|
@ -402,6 +402,57 @@
|
|||
'state': '60',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_total_cleaning_duration:entity-registry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_id': 'sensor.ozmo_950_total_cleaning_duration',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'name': None,
|
||||
'options': dict({
|
||||
'sensor.private': dict({
|
||||
'suggested_unit_of_measurement': <UnitOfTime.HOURS: 'h'>,
|
||||
}),
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.DURATION: 'duration'>,
|
||||
'original_icon': None,
|
||||
'original_name': 'Total cleaning duration',
|
||||
'platform': 'ecovacs',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'total_stats_time',
|
||||
'unique_id': 'E1234567890000000001_total_stats_time',
|
||||
'unit_of_measurement': <UnitOfTime.HOURS: 'h'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_total_cleaning_duration:state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'duration',
|
||||
'friendly_name': 'Ozmo 950 Total cleaning duration',
|
||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||
'unit_of_measurement': <UnitOfTime.HOURS: 'h'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.ozmo_950_total_cleaning_duration',
|
||||
'last_changed': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '40.000',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_total_cleanings:entity-registry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
|
@ -448,57 +499,6 @@
|
|||
'state': '123',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_total_time_cleaned:entity-registry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_id': 'sensor.ozmo_950_total_time_cleaned',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'name': None,
|
||||
'options': dict({
|
||||
'sensor.private': dict({
|
||||
'suggested_unit_of_measurement': <UnitOfTime.HOURS: 'h'>,
|
||||
}),
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.DURATION: 'duration'>,
|
||||
'original_icon': None,
|
||||
'original_name': 'Total time cleaned',
|
||||
'platform': 'ecovacs',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': 'total_stats_time',
|
||||
'unique_id': 'E1234567890000000001_total_stats_time',
|
||||
'unit_of_measurement': <UnitOfTime.HOURS: 'h'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_total_time_cleaned:state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'duration',
|
||||
'friendly_name': 'Ozmo 950 Total time cleaned',
|
||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||
'unit_of_measurement': <UnitOfTime.HOURS: 'h'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.ozmo_950_total_time_cleaned',
|
||||
'last_changed': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '40.000',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[yna5x1-entity_ids0][sensor.ozmo_950_wi_fi_rssi:entity-registry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
'state': 'on',
|
||||
})
|
||||
# ---
|
||||
# name: test_switch_entities[yna5x1][switch.ozmo_950_carpet_auto_fan_speed_boost:entity-registry]
|
||||
# name: test_switch_entities[yna5x1][switch.ozmo_950_carpet_auto_boost_suction:entity-registry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
|
@ -54,7 +54,7 @@
|
|||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.ozmo_950_carpet_auto_fan_speed_boost',
|
||||
'entity_id': 'switch.ozmo_950_carpet_auto_boost_suction',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
|
@ -64,7 +64,7 @@
|
|||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': 'Carpet auto fan speed boost',
|
||||
'original_name': 'Carpet auto-boost suction',
|
||||
'platform': 'ecovacs',
|
||||
'previous_unique_id': None,
|
||||
'supported_features': 0,
|
||||
|
@ -73,13 +73,13 @@
|
|||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_switch_entities[yna5x1][switch.ozmo_950_carpet_auto_fan_speed_boost:state]
|
||||
# name: test_switch_entities[yna5x1][switch.ozmo_950_carpet_auto_boost_suction:state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Ozmo 950 Carpet auto fan speed boost',
|
||||
'friendly_name': 'Ozmo 950 Carpet auto-boost suction',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'switch.ozmo_950_carpet_auto_fan_speed_boost',
|
||||
'entity_id': 'switch.ozmo_950_carpet_auto_boost_suction',
|
||||
'last_changed': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'on',
|
||||
|
|
|
@ -33,13 +33,16 @@ def platforms() -> Platform | list[Platform]:
|
|||
"yna5x1",
|
||||
[
|
||||
("button.ozmo_950_relocate", SetRelocationState()),
|
||||
("button.ozmo_950_reset_brush_lifespan", ResetLifeSpan(LifeSpan.BRUSH)),
|
||||
(
|
||||
"button.ozmo_950_reset_main_brush_lifespan",
|
||||
ResetLifeSpan(LifeSpan.BRUSH),
|
||||
),
|
||||
(
|
||||
"button.ozmo_950_reset_filter_lifespan",
|
||||
ResetLifeSpan(LifeSpan.FILTER),
|
||||
),
|
||||
(
|
||||
"button.ozmo_950_reset_side_brush_lifespan",
|
||||
"button.ozmo_950_reset_side_brushes_lifespan",
|
||||
ResetLifeSpan(LifeSpan.SIDE_BRUSH),
|
||||
),
|
||||
],
|
||||
|
@ -56,7 +59,7 @@ async def test_buttons(
|
|||
entities: list[tuple[str, Command]],
|
||||
) -> None:
|
||||
"""Test that sensor entity snapshots match."""
|
||||
assert sorted(hass.states.async_entity_ids()) == [e[0] for e in entities]
|
||||
assert hass.states.async_entity_ids() == [e[0] for e in entities]
|
||||
device = controller.devices[0]
|
||||
for entity_id, command in entities:
|
||||
assert (state := hass.states.get(entity_id)), f"State of {entity_id} is missing"
|
||||
|
@ -89,9 +92,9 @@ async def test_buttons(
|
|||
(
|
||||
"yna5x1",
|
||||
[
|
||||
"button.ozmo_950_reset_brush_lifespan",
|
||||
"button.ozmo_950_reset_main_brush_lifespan",
|
||||
"button.ozmo_950_reset_filter_lifespan",
|
||||
"button.ozmo_950_reset_side_brush_lifespan",
|
||||
"button.ozmo_950_reset_side_brushes_lifespan",
|
||||
],
|
||||
),
|
||||
],
|
||||
|
|
|
@ -44,7 +44,7 @@ async def notify_events(hass: HomeAssistant, event_bus: EventBus):
|
|||
(
|
||||
"yna5x1",
|
||||
[
|
||||
"select.ozmo_950_water_amount",
|
||||
"select.ozmo_950_water_flow_level",
|
||||
],
|
||||
),
|
||||
],
|
||||
|
@ -58,7 +58,7 @@ async def test_selects(
|
|||
entity_ids: list[str],
|
||||
) -> None:
|
||||
"""Test that select entity snapshots match."""
|
||||
assert entity_ids == sorted(hass.states.async_entity_ids())
|
||||
assert entity_ids == hass.states.async_entity_ids()
|
||||
for entity_id in entity_ids:
|
||||
assert (state := hass.states.get(entity_id)), f"State of {entity_id} is missing"
|
||||
assert state.state == STATE_UNKNOWN
|
||||
|
@ -83,7 +83,7 @@ async def test_selects(
|
|||
[
|
||||
(
|
||||
"yna5x1",
|
||||
"select.ozmo_950_water_amount",
|
||||
"select.ozmo_950_water_flow_level",
|
||||
"ultrahigh",
|
||||
"low",
|
||||
SetWaterInfo(WaterAmount.LOW),
|
||||
|
|
|
@ -54,18 +54,18 @@ async def notify_events(hass: HomeAssistant, event_bus: EventBus):
|
|||
"yna5x1",
|
||||
[
|
||||
"sensor.ozmo_950_area_cleaned",
|
||||
"sensor.ozmo_950_battery",
|
||||
"sensor.ozmo_950_brush_lifespan",
|
||||
"sensor.ozmo_950_error",
|
||||
"sensor.ozmo_950_filter_lifespan",
|
||||
"sensor.ozmo_950_ip_address",
|
||||
"sensor.ozmo_950_side_brush_lifespan",
|
||||
"sensor.ozmo_950_time_cleaned",
|
||||
"sensor.ozmo_950_cleaning_duration",
|
||||
"sensor.ozmo_950_total_area_cleaned",
|
||||
"sensor.ozmo_950_total_cleaning_duration",
|
||||
"sensor.ozmo_950_total_cleanings",
|
||||
"sensor.ozmo_950_total_time_cleaned",
|
||||
"sensor.ozmo_950_battery",
|
||||
"sensor.ozmo_950_ip_address",
|
||||
"sensor.ozmo_950_wi_fi_rssi",
|
||||
"sensor.ozmo_950_wi_fi_ssid",
|
||||
"sensor.ozmo_950_main_brush_lifespan",
|
||||
"sensor.ozmo_950_filter_lifespan",
|
||||
"sensor.ozmo_950_side_brushes_lifespan",
|
||||
"sensor.ozmo_950_error",
|
||||
],
|
||||
),
|
||||
],
|
||||
|
@ -79,7 +79,7 @@ async def test_sensors(
|
|||
entity_ids: list[str],
|
||||
) -> None:
|
||||
"""Test that sensor entity snapshots match."""
|
||||
assert entity_ids == sorted(hass.states.async_entity_ids())
|
||||
assert entity_ids == hass.states.async_entity_ids()
|
||||
for entity_id in entity_ids:
|
||||
assert (state := hass.states.get(entity_id)), f"State of {entity_id} is missing"
|
||||
assert state.state == STATE_UNKNOWN
|
||||
|
|
|
@ -69,7 +69,7 @@ class SwitchTestCase:
|
|||
SetContinuousCleaning,
|
||||
),
|
||||
SwitchTestCase(
|
||||
"switch.ozmo_950_carpet_auto_fan_speed_boost",
|
||||
"switch.ozmo_950_carpet_auto_boost_suction",
|
||||
CarpetAutoFanBoostEvent(True),
|
||||
SetCarpetAutoFanBoost,
|
||||
),
|
||||
|
@ -90,9 +90,7 @@ async def test_switch_entities(
|
|||
device = controller.devices[0]
|
||||
event_bus = device.events
|
||||
|
||||
assert sorted(hass.states.async_entity_ids()) == sorted(
|
||||
test.entity_id for test in tests
|
||||
)
|
||||
assert hass.states.async_entity_ids() == [test.entity_id for test in tests]
|
||||
for test_case in tests:
|
||||
entity_id = test_case.entity_id
|
||||
assert (state := hass.states.get(entity_id)), f"State of {entity_id} is missing"
|
||||
|
@ -139,7 +137,7 @@ async def test_switch_entities(
|
|||
[
|
||||
"switch.ozmo_950_advanced_mode",
|
||||
"switch.ozmo_950_continuous_cleaning",
|
||||
"switch.ozmo_950_carpet_auto_fan_speed_boost",
|
||||
"switch.ozmo_950_carpet_auto_boost_suction",
|
||||
],
|
||||
),
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue