Add more fixtures to the matter fixture (#126761)

* Add more fixtures to the matter fixture

* Add Valve
This commit is contained in:
Joost Lekkerkerker 2024-10-04 09:24:06 +02:00 committed by GitHub
parent 6a44d66fed
commit 07704b8511
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1992 additions and 3 deletions

View File

@ -73,11 +73,47 @@ async def integration_fixture(
@pytest.fixture(
params=[
"door_lock",
"smoke_detector",
"air_purifier",
"eve_energy_plug_patched",
"air_quality_sensor",
"color_temperature_light",
"dimmable_light",
"dimmable_plugin_unit",
"door_lock",
"door_lock_with_unbolt",
"eve_contact_sensor",
"eve_energy_plug",
"eve_energy_plug_patched",
"eve_thermo",
"eve_weather_sensor",
"extended_color_light",
"fan",
"flow_sensor",
"generic_switch",
"generic_switch_multi",
"humidity_sensor",
"leak_sensor",
"light_sensor",
"microwave_oven",
"multi_endpoint_light",
"occupancy_sensor",
"on_off_plugin_unit",
"onoff_light",
"onoff_light_alt_name",
"onoff_light_no_name",
"onoff_light_with_levelcontrol_present",
"pressure_sensor",
"room_airconditioner",
"silabs_dishwasher",
"smoke_detector",
"switch_unit",
"temperature_sensor",
"thermostat",
"valve",
"window_covering_full",
"window_covering_lift",
"window_covering_pa_lift",
"window_covering_pa_tilt",
"window_covering_tilt",
]
)
async def matter_devices(

View File

@ -93,6 +93,335 @@
'state': 'off',
})
# ---
# name: test_binary_sensors[door_lock_with_unbolt-True][binary_sensor.mock_door_lock_battery-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.mock_door_lock_battery',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.BATTERY: 'battery'>,
'original_icon': None,
'original_name': 'Battery',
'platform': 'matter',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': None,
'unique_id': '00000000000004D2-0000000000000001-MatterNodeDevice-1-BatteryChargeLevel-47-14',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[door_lock_with_unbolt-True][binary_sensor.mock_door_lock_battery-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'battery',
'friendly_name': 'Mock Door Lock Battery',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.mock_door_lock_battery',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[door_lock_with_unbolt-True][binary_sensor.mock_door_lock_door-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.mock_door_lock_door',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.DOOR: 'door'>,
'original_icon': None,
'original_name': 'Door',
'platform': 'matter',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': None,
'unique_id': '00000000000004D2-0000000000000001-MatterNodeDevice-1-LockDoorStateSensor-257-3',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[door_lock_with_unbolt-True][binary_sensor.mock_door_lock_door-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'door',
'friendly_name': 'Mock Door Lock Door',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.mock_door_lock_door',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[eve_contact_sensor-True][binary_sensor.eve_door_door-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.eve_door_door',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.DOOR: 'door'>,
'original_icon': None,
'original_name': 'Door',
'platform': 'matter',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': None,
'unique_id': '00000000000004D2-0000000000000001-MatterNodeDevice-1-ContactSensor-69-0',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[eve_contact_sensor-True][binary_sensor.eve_door_door-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'door',
'friendly_name': 'Eve Door Door',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.eve_door_door',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_binary_sensors[leak_sensor-True][binary_sensor.water_leak_detector_water_leak-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.water_leak_detector_water_leak',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.MOISTURE: 'moisture'>,
'original_icon': None,
'original_name': 'Water leak',
'platform': 'matter',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'water_leak',
'unique_id': '00000000000004D2-0000000000000020-MatterNodeDevice-1-WaterLeakDetector-69-0',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[leak_sensor-True][binary_sensor.water_leak_detector_water_leak-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'moisture',
'friendly_name': 'Water Leak Detector Water leak',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.water_leak_detector_water_leak',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_binary_sensors[occupancy_sensor-True][binary_sensor.mock_occupancy_sensor_occupancy-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.mock_occupancy_sensor_occupancy',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.OCCUPANCY: 'occupancy'>,
'original_icon': None,
'original_name': 'Occupancy',
'platform': 'matter',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': None,
'unique_id': '00000000000004D2-0000000000000001-MatterNodeDevice-1-OccupancySensor-1030-0',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[occupancy_sensor-True][binary_sensor.mock_occupancy_sensor_occupancy-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'occupancy',
'friendly_name': 'Mock Occupancy Sensor Occupancy',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.mock_occupancy_sensor_occupancy',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'on',
})
# ---
# name: test_binary_sensors[onoff_light_alt_name-True][binary_sensor.mock_onoff_light_occupancy-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.mock_onoff_light_occupancy',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.OCCUPANCY: 'occupancy'>,
'original_icon': None,
'original_name': 'Occupancy',
'platform': 'matter',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': None,
'unique_id': '00000000000004D2-0000000000000001-MatterNodeDevice-1-OccupancySensor-1030-0',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[onoff_light_alt_name-True][binary_sensor.mock_onoff_light_occupancy-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'occupancy',
'friendly_name': 'Mock OnOff Light Occupancy',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.mock_onoff_light_occupancy',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[onoff_light_no_name-True][binary_sensor.mock_light_occupancy-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
'area_id': None,
'capabilities': None,
'config_entry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': None,
'entity_id': 'binary_sensor.mock_light_occupancy',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'options': dict({
}),
'original_device_class': <BinarySensorDeviceClass.OCCUPANCY: 'occupancy'>,
'original_icon': None,
'original_name': 'Occupancy',
'platform': 'matter',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': None,
'unique_id': '00000000000004D2-0000000000000001-MatterNodeDevice-1-OccupancySensor-1030-0',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[onoff_light_no_name-True][binary_sensor.mock_light_occupancy-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'occupancy',
'friendly_name': 'Mock Light Occupancy',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.mock_light_occupancy',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_battery_alert-entry]
EntityRegistryEntrySnapshot({
'aliases': set({

File diff suppressed because it is too large Load Diff