mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 02:07:54 +00:00
Use snake case in matter fixture nodes (#126743)
This commit is contained in:
parent
083b586d19
commit
662a704165
@ -72,11 +72,11 @@ async def integration_fixture(
|
||||
|
||||
@pytest.fixture(
|
||||
params=[
|
||||
"door-lock",
|
||||
"smoke-detector",
|
||||
"air-purifier",
|
||||
"eve-energy-plug-patched",
|
||||
"eve-energy-plug",
|
||||
"door_lock",
|
||||
"smoke_detector",
|
||||
"air_purifier",
|
||||
"eve_energy_plug_patched",
|
||||
"eve_energy_plug",
|
||||
]
|
||||
)
|
||||
async def matter_devices(
|
||||
@ -91,7 +91,7 @@ async def door_lock_fixture(
|
||||
hass: HomeAssistant, matter_client: MagicMock
|
||||
) -> MatterNode:
|
||||
"""Fixture for a door lock node."""
|
||||
return await setup_integration_with_node_fixture(hass, "door-lock", matter_client)
|
||||
return await setup_integration_with_node_fixture(hass, "door_lock", matter_client)
|
||||
|
||||
|
||||
@pytest.fixture(name="smoke_detector")
|
||||
@ -100,7 +100,7 @@ async def smoke_detector_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a smoke detector node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "smoke-detector", matter_client
|
||||
hass, "smoke_detector", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ async def door_lock_with_unbolt_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a door lock node with unbolt feature."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "door-lock-with-unbolt", matter_client
|
||||
hass, "door_lock_with_unbolt", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -120,5 +120,5 @@ async def eve_contact_sensor_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a contact sensor node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "eve-contact-sensor", matter_client
|
||||
hass, "eve_contact_sensor", matter_client
|
||||
)
|
||||
|
@ -1,5 +1,5 @@
|
||||
# serializer version: 1
|
||||
# name: test_binary_sensors[door-lock-True][binary_sensor.mock_door_lock_battery-entry]
|
||||
# name: test_binary_sensors[door_lock-True][binary_sensor.mock_door_lock_battery-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -32,7 +32,7 @@
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[door-lock-True][binary_sensor.mock_door_lock_battery-state]
|
||||
# name: test_binary_sensors[door_lock-True][binary_sensor.mock_door_lock_battery-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'battery',
|
||||
@ -46,7 +46,7 @@
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[door-lock-True][binary_sensor.mock_door_lock_door-entry]
|
||||
# name: test_binary_sensors[door_lock-True][binary_sensor.mock_door_lock_door-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -79,7 +79,7 @@
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[door-lock-True][binary_sensor.mock_door_lock_door-state]
|
||||
# name: test_binary_sensors[door_lock-True][binary_sensor.mock_door_lock_door-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'door',
|
||||
@ -93,7 +93,7 @@
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_battery_alert-entry]
|
||||
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_battery_alert-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -126,7 +126,7 @@
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_battery_alert-state]
|
||||
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_battery_alert-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'battery',
|
||||
@ -140,7 +140,7 @@
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_end_of_service-entry]
|
||||
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_end_of_service-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -173,7 +173,7 @@
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_end_of_service-state]
|
||||
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_end_of_service-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'problem',
|
||||
@ -187,7 +187,7 @@
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_hardware_fault-entry]
|
||||
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_hardware_fault-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -220,7 +220,7 @@
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_hardware_fault-state]
|
||||
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_hardware_fault-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'problem',
|
||||
@ -234,7 +234,7 @@
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_muted-entry]
|
||||
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_muted-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -267,7 +267,7 @@
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_muted-state]
|
||||
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_muted-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Smoke sensor Muted',
|
||||
@ -280,7 +280,7 @@
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_smoke-entry]
|
||||
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_smoke-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -313,7 +313,7 @@
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_smoke-state]
|
||||
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_smoke-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'smoke',
|
||||
@ -327,7 +327,7 @@
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_test_in_progress-entry]
|
||||
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_test_in_progress-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -360,7 +360,7 @@
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_test_in_progress-state]
|
||||
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_test_in_progress-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'running',
|
||||
|
@ -1,5 +1,5 @@
|
||||
# serializer version: 1
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_activated_carbon_filter_condition-entry]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_activated_carbon_filter_condition-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -34,7 +34,7 @@
|
||||
'unit_of_measurement': '%',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_activated_carbon_filter_condition-state]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_activated_carbon_filter_condition-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Air Purifier Activated carbon filter condition',
|
||||
@ -49,7 +49,7 @@
|
||||
'state': '100',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_air_quality-entry]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_air_quality-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -91,7 +91,7 @@
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_air_quality-state]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_air_quality-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'enum',
|
||||
@ -113,7 +113,7 @@
|
||||
'state': 'good',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_carbon_dioxide-entry]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_carbon_dioxide-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -148,7 +148,7 @@
|
||||
'unit_of_measurement': 'ppm',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_carbon_dioxide-state]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_carbon_dioxide-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'carbon_dioxide',
|
||||
@ -164,7 +164,7 @@
|
||||
'state': '2.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_carbon_monoxide-entry]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_carbon_monoxide-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -199,7 +199,7 @@
|
||||
'unit_of_measurement': 'ppm',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_carbon_monoxide-state]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_carbon_monoxide-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'carbon_monoxide',
|
||||
@ -215,7 +215,7 @@
|
||||
'state': '2.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_hepa_filter_condition-entry]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_hepa_filter_condition-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -250,7 +250,7 @@
|
||||
'unit_of_measurement': '%',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_hepa_filter_condition-state]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_hepa_filter_condition-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Air Purifier Hepa filter condition',
|
||||
@ -265,7 +265,7 @@
|
||||
'state': '100',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_humidity-entry]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_humidity-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -300,7 +300,7 @@
|
||||
'unit_of_measurement': '%',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_humidity-state]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_humidity-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'humidity',
|
||||
@ -316,7 +316,7 @@
|
||||
'state': '50.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_nitrogen_dioxide-entry]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_nitrogen_dioxide-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -351,7 +351,7 @@
|
||||
'unit_of_measurement': 'ppm',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_nitrogen_dioxide-state]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_nitrogen_dioxide-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'nitrogen_dioxide',
|
||||
@ -367,7 +367,7 @@
|
||||
'state': '2.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_ozone-entry]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_ozone-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -402,7 +402,7 @@
|
||||
'unit_of_measurement': 'ppm',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_ozone-state]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_ozone-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'ozone',
|
||||
@ -418,7 +418,7 @@
|
||||
'state': '2.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_pm1-entry]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_pm1-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -453,7 +453,7 @@
|
||||
'unit_of_measurement': 'µg/m³',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_pm1-state]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_pm1-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'pm1',
|
||||
@ -469,7 +469,7 @@
|
||||
'state': '2.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_pm10-entry]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_pm10-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -504,7 +504,7 @@
|
||||
'unit_of_measurement': 'µg/m³',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_pm10-state]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_pm10-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'pm10',
|
||||
@ -520,7 +520,7 @@
|
||||
'state': '2.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_pm2_5-entry]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_pm2_5-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -555,7 +555,7 @@
|
||||
'unit_of_measurement': 'µg/m³',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_pm2_5-state]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_pm2_5-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'pm25',
|
||||
@ -571,7 +571,7 @@
|
||||
'state': '2.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_temperature-entry]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_temperature-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -606,7 +606,7 @@
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_temperature-state]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_temperature-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'temperature',
|
||||
@ -622,7 +622,7 @@
|
||||
'state': '20.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_vocs-entry]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_vocs-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -657,7 +657,7 @@
|
||||
'unit_of_measurement': 'ppm',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[air-purifier-True][sensor.air_purifier_vocs-state]
|
||||
# name: test_sensors[air_purifier-True][sensor.air_purifier_vocs-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'volatile_organic_compounds_parts',
|
||||
@ -673,7 +673,7 @@
|
||||
'state': '2.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-True][sensor.eve_energy_plug_current-entry]
|
||||
# name: test_sensors[eve_energy_plug-True][sensor.eve_energy_plug_current-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -711,7 +711,7 @@
|
||||
'unit_of_measurement': <UnitOfElectricCurrent.AMPERE: 'A'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-True][sensor.eve_energy_plug_current-state]
|
||||
# name: test_sensors[eve_energy_plug-True][sensor.eve_energy_plug_current-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'current',
|
||||
@ -727,7 +727,7 @@
|
||||
'state': '0.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-True][sensor.eve_energy_plug_energy-entry]
|
||||
# name: test_sensors[eve_energy_plug-True][sensor.eve_energy_plug_energy-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -765,7 +765,7 @@
|
||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-True][sensor.eve_energy_plug_energy-state]
|
||||
# name: test_sensors[eve_energy_plug-True][sensor.eve_energy_plug_energy-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'energy',
|
||||
@ -781,7 +781,7 @@
|
||||
'state': '0.220000028610229',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-True][sensor.eve_energy_plug_power-entry]
|
||||
# name: test_sensors[eve_energy_plug-True][sensor.eve_energy_plug_power-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -819,7 +819,7 @@
|
||||
'unit_of_measurement': <UnitOfPower.WATT: 'W'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-True][sensor.eve_energy_plug_power-state]
|
||||
# name: test_sensors[eve_energy_plug-True][sensor.eve_energy_plug_power-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'power',
|
||||
@ -835,7 +835,7 @@
|
||||
'state': '0.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-True][sensor.eve_energy_plug_voltage-entry]
|
||||
# name: test_sensors[eve_energy_plug-True][sensor.eve_energy_plug_voltage-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -873,7 +873,7 @@
|
||||
'unit_of_measurement': <UnitOfElectricPotential.VOLT: 'V'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-True][sensor.eve_energy_plug_voltage-state]
|
||||
# name: test_sensors[eve_energy_plug-True][sensor.eve_energy_plug_voltage-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'voltage',
|
||||
@ -889,7 +889,7 @@
|
||||
'state': '238.800003051758',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-patched-True][sensor.eve_energy_plug_patched_current-entry]
|
||||
# name: test_sensors[eve_energy_plug_patched-True][sensor.eve_energy_plug_patched_current-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -927,7 +927,7 @@
|
||||
'unit_of_measurement': <UnitOfElectricCurrent.AMPERE: 'A'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-patched-True][sensor.eve_energy_plug_patched_current-state]
|
||||
# name: test_sensors[eve_energy_plug_patched-True][sensor.eve_energy_plug_patched_current-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'current',
|
||||
@ -943,7 +943,7 @@
|
||||
'state': '2.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-patched-True][sensor.eve_energy_plug_patched_energy-entry]
|
||||
# name: test_sensors[eve_energy_plug_patched-True][sensor.eve_energy_plug_patched_energy-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -981,7 +981,7 @@
|
||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-patched-True][sensor.eve_energy_plug_patched_energy-state]
|
||||
# name: test_sensors[eve_energy_plug_patched-True][sensor.eve_energy_plug_patched_energy-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'energy',
|
||||
@ -997,7 +997,7 @@
|
||||
'state': '0.0025',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-patched-True][sensor.eve_energy_plug_patched_power-entry]
|
||||
# name: test_sensors[eve_energy_plug_patched-True][sensor.eve_energy_plug_patched_power-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -1035,7 +1035,7 @@
|
||||
'unit_of_measurement': <UnitOfPower.WATT: 'W'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-patched-True][sensor.eve_energy_plug_patched_power-state]
|
||||
# name: test_sensors[eve_energy_plug_patched-True][sensor.eve_energy_plug_patched_power-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'power',
|
||||
@ -1051,7 +1051,7 @@
|
||||
'state': '550.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-patched-True][sensor.eve_energy_plug_patched_voltage-entry]
|
||||
# name: test_sensors[eve_energy_plug_patched-True][sensor.eve_energy_plug_patched_voltage-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -1089,7 +1089,7 @@
|
||||
'unit_of_measurement': <UnitOfElectricPotential.VOLT: 'V'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve-energy-plug-patched-True][sensor.eve_energy_plug_patched_voltage-state]
|
||||
# name: test_sensors[eve_energy_plug_patched-True][sensor.eve_energy_plug_patched_voltage-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'voltage',
|
||||
@ -1105,7 +1105,7 @@
|
||||
'state': '220.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[smoke-detector-True][sensor.smoke_sensor_battery-entry]
|
||||
# name: test_sensors[smoke_detector-True][sensor.smoke_sensor_battery-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -1140,7 +1140,7 @@
|
||||
'unit_of_measurement': '%',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[smoke-detector-True][sensor.smoke_sensor_battery-state]
|
||||
# name: test_sensors[smoke_detector-True][sensor.smoke_sensor_battery-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'battery',
|
||||
@ -1156,7 +1156,7 @@
|
||||
'state': '94',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[smoke-detector-True][sensor.smoke_sensor_voltage-entry]
|
||||
# name: test_sensors[smoke_detector-True][sensor.smoke_sensor_voltage-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@ -1191,7 +1191,7 @@
|
||||
'unit_of_measurement': <UnitOfElectricPotential.VOLT: 'V'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[smoke-detector-True][sensor.smoke_sensor_voltage-state]
|
||||
# name: test_sensors[smoke_detector-True][sensor.smoke_sensor_voltage-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'voltage',
|
||||
|
@ -22,9 +22,9 @@ from tests.common import MockConfigEntry
|
||||
@pytest.mark.parametrize(
|
||||
("node_fixture", "name"),
|
||||
[
|
||||
("onoff-light", "Mock OnOff Light"),
|
||||
("onoff-light-alt-name", "Mock OnOff Light"),
|
||||
("onoff-light-no-name", "Mock Light"),
|
||||
("onoff_light", "Mock OnOff Light"),
|
||||
("onoff_light_alt_name", "Mock OnOff Light"),
|
||||
("onoff_light_no_name", "Mock Light"),
|
||||
],
|
||||
)
|
||||
async def test_device_registry_single_node_device(
|
||||
@ -70,7 +70,7 @@ async def test_device_registry_single_node_device_alt(
|
||||
"""Test additional device with different attribute values."""
|
||||
await setup_integration_with_node_fixture(
|
||||
hass,
|
||||
"on-off-plugin-unit",
|
||||
"on_off_plugin_unit",
|
||||
matter_client,
|
||||
)
|
||||
|
||||
@ -98,7 +98,7 @@ async def test_device_registry_bridge(
|
||||
"""Test bridge devices are set up correctly with via_device."""
|
||||
await setup_integration_with_node_fixture(
|
||||
hass,
|
||||
"fake-bridge-two-light",
|
||||
"fake_bridge_two_light",
|
||||
matter_client,
|
||||
)
|
||||
|
||||
@ -156,7 +156,7 @@ async def test_node_added_subscription(
|
||||
)
|
||||
|
||||
node_added_callback = matter_client.subscribe_events.call_args.kwargs["callback"]
|
||||
node = create_node_from_fixture("onoff-light")
|
||||
node = create_node_from_fixture("onoff_light")
|
||||
|
||||
entity_state = hass.states.get("light.mock_onoff_light_light")
|
||||
assert not entity_state
|
||||
@ -175,7 +175,7 @@ async def test_device_registry_single_node_composed_device(
|
||||
"""Test that a composed device within a standalone node only creates one HA device entry."""
|
||||
await setup_integration_with_node_fixture(
|
||||
hass,
|
||||
"air-purifier",
|
||||
"air_purifier",
|
||||
matter_client,
|
||||
)
|
||||
dev_reg = dr.async_get(hass)
|
||||
@ -189,7 +189,7 @@ async def test_multi_endpoint_name(
|
||||
"""Test that the entity name gets postfixed if the device has multiple primary endpoints."""
|
||||
await setup_integration_with_node_fixture(
|
||||
hass,
|
||||
"multi-endpoint-light",
|
||||
"multi_endpoint_light",
|
||||
matter_client,
|
||||
)
|
||||
entity_state = hass.states.get("light.inovelli_light_1")
|
||||
@ -220,8 +220,8 @@ async def test_bad_node_not_crash_integration(
|
||||
caplog: pytest.LogCaptureFixture,
|
||||
) -> None:
|
||||
"""Test that a bad node does not crash the integration."""
|
||||
good_node = create_node_from_fixture("onoff-light")
|
||||
bad_node = create_node_from_fixture("onoff-light")
|
||||
good_node = create_node_from_fixture("onoff_light")
|
||||
bad_node = create_node_from_fixture("onoff_light")
|
||||
del bad_node.endpoints[0].node
|
||||
matter_client.get_nodes.return_value = [good_node, bad_node]
|
||||
config_entry = MockConfigEntry(
|
||||
|
@ -209,7 +209,7 @@ async def test_node_diagnostics(
|
||||
# setup (mock) integration with a random node fixture
|
||||
await setup_integration_with_node_fixture(
|
||||
hass,
|
||||
"onoff-light",
|
||||
"onoff_light",
|
||||
matter_client,
|
||||
)
|
||||
# get the device registry entry for the mocked node
|
||||
@ -283,7 +283,7 @@ async def test_ping_node(
|
||||
# setup (mock) integration with a random node fixture
|
||||
await setup_integration_with_node_fixture(
|
||||
hass,
|
||||
"onoff-light",
|
||||
"onoff_light",
|
||||
matter_client,
|
||||
)
|
||||
# get the device registry entry for the mocked node
|
||||
@ -343,7 +343,7 @@ async def test_open_commissioning_window(
|
||||
# setup (mock) integration with a random node fixture
|
||||
await setup_integration_with_node_fixture(
|
||||
hass,
|
||||
"onoff-light",
|
||||
"onoff_light",
|
||||
matter_client,
|
||||
)
|
||||
# get the device registry entry for the mocked node
|
||||
@ -409,7 +409,7 @@ async def test_remove_matter_fabric(
|
||||
# setup (mock) integration with a random node fixture
|
||||
await setup_integration_with_node_fixture(
|
||||
hass,
|
||||
"onoff-light",
|
||||
"onoff_light",
|
||||
matter_client,
|
||||
)
|
||||
# get the device registry entry for the mocked node
|
||||
@ -465,7 +465,7 @@ async def test_interview_node(
|
||||
# setup (mock) integration with a random node fixture
|
||||
await setup_integration_with_node_fixture(
|
||||
hass,
|
||||
"onoff-light",
|
||||
"onoff_light",
|
||||
matter_client,
|
||||
)
|
||||
# get the device registry entry for the mocked node
|
||||
|
@ -40,7 +40,7 @@ async def occupancy_sensor_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a occupancy sensor node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "occupancy-sensor", matter_client
|
||||
hass, "occupancy_sensor", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -71,8 +71,8 @@ async def test_occupancy_sensor(
|
||||
@pytest.mark.parametrize(
|
||||
("fixture", "entity_id"),
|
||||
[
|
||||
("eve-contact-sensor", "binary_sensor.eve_door_door"),
|
||||
("leak-sensor", "binary_sensor.water_leak_detector_water_leak"),
|
||||
("eve_contact_sensor", "binary_sensor.eve_door_door"),
|
||||
("leak_sensor", "binary_sensor.water_leak_detector_water_leak"),
|
||||
],
|
||||
)
|
||||
async def test_boolean_state_sensors(
|
||||
|
@ -17,7 +17,7 @@ async def powerplug_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a Powerplug node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "eve-energy-plug", matter_client
|
||||
hass, "eve_energy_plug", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ async def dishwasher_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for an dishwasher node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "silabs-dishwasher", matter_client
|
||||
hass, "silabs_dishwasher", matter_client
|
||||
)
|
||||
|
||||
|
||||
|
@ -31,7 +31,7 @@ async def room_airconditioner(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a room air conditioner node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "room-airconditioner", matter_client
|
||||
hass, "room_airconditioner", matter_client
|
||||
)
|
||||
|
||||
|
||||
|
@ -27,11 +27,11 @@ from .common import (
|
||||
@pytest.mark.parametrize(
|
||||
("fixture", "entity_id"),
|
||||
[
|
||||
("window-covering_lift", "cover.mock_lift_window_covering_cover"),
|
||||
("window-covering_pa-lift", "cover.longan_link_wncv_da01_cover"),
|
||||
("window-covering_tilt", "cover.mock_tilt_window_covering_cover"),
|
||||
("window-covering_pa-tilt", "cover.mock_pa_tilt_window_covering_cover"),
|
||||
("window-covering_full", "cover.mock_full_window_covering_cover"),
|
||||
("window_covering_lift", "cover.mock_lift_window_covering_cover"),
|
||||
("window_covering_pa_lift", "cover.longan_link_wncv_da01_cover"),
|
||||
("window_covering_tilt", "cover.mock_tilt_window_covering_cover"),
|
||||
("window_covering_pa_tilt", "cover.mock_pa_tilt_window_covering_cover"),
|
||||
("window_covering_full", "cover.mock_full_window_covering_cover"),
|
||||
],
|
||||
)
|
||||
async def test_cover(
|
||||
@ -105,9 +105,9 @@ async def test_cover(
|
||||
@pytest.mark.parametrize(
|
||||
("fixture", "entity_id"),
|
||||
[
|
||||
("window-covering_lift", "cover.mock_lift_window_covering_cover"),
|
||||
("window-covering_pa-lift", "cover.longan_link_wncv_da01_cover"),
|
||||
("window-covering_full", "cover.mock_full_window_covering_cover"),
|
||||
("window_covering_lift", "cover.mock_lift_window_covering_cover"),
|
||||
("window_covering_pa_lift", "cover.longan_link_wncv_da01_cover"),
|
||||
("window_covering_full", "cover.mock_full_window_covering_cover"),
|
||||
],
|
||||
)
|
||||
async def test_cover_lift(
|
||||
@ -162,7 +162,7 @@ async def test_cover_lift(
|
||||
@pytest.mark.parametrize(
|
||||
("fixture", "entity_id"),
|
||||
[
|
||||
("window-covering_lift", "cover.mock_lift_window_covering_cover"),
|
||||
("window_covering_lift", "cover.mock_lift_window_covering_cover"),
|
||||
],
|
||||
)
|
||||
async def test_cover_lift_only(
|
||||
@ -207,7 +207,7 @@ async def test_cover_lift_only(
|
||||
@pytest.mark.parametrize(
|
||||
("fixture", "entity_id"),
|
||||
[
|
||||
("window-covering_pa-lift", "cover.longan_link_wncv_da01_cover"),
|
||||
("window_covering_pa_lift", "cover.longan_link_wncv_da01_cover"),
|
||||
],
|
||||
)
|
||||
async def test_cover_position_aware_lift(
|
||||
@ -259,9 +259,9 @@ async def test_cover_position_aware_lift(
|
||||
@pytest.mark.parametrize(
|
||||
("fixture", "entity_id"),
|
||||
[
|
||||
("window-covering_tilt", "cover.mock_tilt_window_covering_cover"),
|
||||
("window-covering_pa-tilt", "cover.mock_pa_tilt_window_covering_cover"),
|
||||
("window-covering_full", "cover.mock_full_window_covering_cover"),
|
||||
("window_covering_tilt", "cover.mock_tilt_window_covering_cover"),
|
||||
("window_covering_pa_tilt", "cover.mock_pa_tilt_window_covering_cover"),
|
||||
("window_covering_full", "cover.mock_full_window_covering_cover"),
|
||||
],
|
||||
)
|
||||
async def test_cover_tilt(
|
||||
@ -317,7 +317,7 @@ async def test_cover_tilt(
|
||||
@pytest.mark.parametrize(
|
||||
("fixture", "entity_id"),
|
||||
[
|
||||
("window-covering_tilt", "cover.mock_tilt_window_covering_cover"),
|
||||
("window_covering_tilt", "cover.mock_tilt_window_covering_cover"),
|
||||
],
|
||||
)
|
||||
async def test_cover_tilt_only(
|
||||
@ -360,7 +360,7 @@ async def test_cover_tilt_only(
|
||||
@pytest.mark.parametrize(
|
||||
("fixture", "entity_id"),
|
||||
[
|
||||
("window-covering_pa-tilt", "cover.mock_pa_tilt_window_covering_cover"),
|
||||
("window_covering_pa_tilt", "cover.mock_pa_tilt_window_covering_cover"),
|
||||
],
|
||||
)
|
||||
async def test_cover_position_aware_tilt(
|
||||
@ -407,7 +407,7 @@ async def test_cover_full_features(
|
||||
|
||||
window_covering = await setup_integration_with_node_fixture(
|
||||
hass,
|
||||
"window-covering_full",
|
||||
"window_covering_full",
|
||||
matter_client,
|
||||
)
|
||||
entity_id = "cover.mock_full_window_covering_cover"
|
||||
|
@ -18,7 +18,7 @@ async def switch_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a GenericSwitch node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "generic-switch", matter_client
|
||||
hass, "generic_switch", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ async def multi_switch_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a GenericSwitch node with multiple buttons."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "generic-switch-multi", matter_client
|
||||
hass, "generic_switch_multi", matter_client
|
||||
)
|
||||
|
||||
|
||||
|
@ -42,7 +42,7 @@ async def air_purifier_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a Air Purifier node (containing Fan cluster)."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "air-purifier", matter_client
|
||||
hass, "air_purifier", matter_client
|
||||
)
|
||||
|
||||
|
||||
|
@ -54,7 +54,7 @@ async def test_entry_setup_unload(
|
||||
matter_client: MagicMock,
|
||||
) -> None:
|
||||
"""Test the integration set up and unload."""
|
||||
node = create_node_from_fixture("onoff-light")
|
||||
node = create_node_from_fixture("onoff_light")
|
||||
matter_client.get_nodes.return_value = [node]
|
||||
matter_client.get_node.return_value = node
|
||||
entry = MockConfigEntry(domain="matter", data={"url": "ws://localhost:5580/ws"})
|
||||
|
@ -21,18 +21,18 @@ from .common import (
|
||||
("fixture", "entity_id", "supported_color_modes"),
|
||||
[
|
||||
(
|
||||
"extended-color-light",
|
||||
"extended_color_light",
|
||||
"light.mock_extended_color_light_light",
|
||||
["color_temp", "hs", "xy"],
|
||||
),
|
||||
(
|
||||
"color-temperature-light",
|
||||
"color_temperature_light",
|
||||
"light.mock_color_temperature_light_light",
|
||||
["color_temp"],
|
||||
),
|
||||
("dimmable-light", "light.mock_dimmable_light_light", ["brightness"]),
|
||||
("onoff-light", "light.mock_onoff_light_light", ["onoff"]),
|
||||
("onoff-light-with-levelcontrol-present", "light.d215s_light", ["onoff"]),
|
||||
("dimmable_light", "light.mock_dimmable_light_light", ["brightness"]),
|
||||
("onoff_light", "light.mock_onoff_light_light", ["onoff"]),
|
||||
("onoff_light_with_levelcontrol_present", "light.d215s_light", ["onoff"]),
|
||||
],
|
||||
)
|
||||
async def test_light_turn_on_off(
|
||||
@ -113,10 +113,10 @@ async def test_light_turn_on_off(
|
||||
@pytest.mark.parametrize(
|
||||
("fixture", "entity_id"),
|
||||
[
|
||||
("extended-color-light", "light.mock_extended_color_light_light"),
|
||||
("color-temperature-light", "light.mock_color_temperature_light_light"),
|
||||
("dimmable-light", "light.mock_dimmable_light_light"),
|
||||
("dimmable-plugin-unit", "light.dimmable_plugin_unit_light"),
|
||||
("extended_color_light", "light.mock_extended_color_light_light"),
|
||||
("color_temperature_light", "light.mock_color_temperature_light_light"),
|
||||
("dimmable_light", "light.mock_dimmable_light_light"),
|
||||
("dimmable_plugin_unit", "light.dimmable_plugin_unit_light"),
|
||||
],
|
||||
)
|
||||
async def test_dimmable_light(
|
||||
@ -189,8 +189,8 @@ async def test_dimmable_light(
|
||||
@pytest.mark.parametrize(
|
||||
("fixture", "entity_id"),
|
||||
[
|
||||
("extended-color-light", "light.mock_extended_color_light_light"),
|
||||
("color-temperature-light", "light.mock_color_temperature_light_light"),
|
||||
("extended_color_light", "light.mock_extended_color_light_light"),
|
||||
("color_temperature_light", "light.mock_color_temperature_light_light"),
|
||||
],
|
||||
)
|
||||
async def test_color_temperature_light(
|
||||
@ -287,7 +287,7 @@ async def test_color_temperature_light(
|
||||
@pytest.mark.parametrize(
|
||||
("fixture", "entity_id"),
|
||||
[
|
||||
("extended-color-light", "light.mock_extended_color_light_light"),
|
||||
("extended_color_light", "light.mock_extended_color_light_light"),
|
||||
],
|
||||
)
|
||||
async def test_extended_color_light(
|
||||
|
@ -22,7 +22,7 @@ async def dimmable_light_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a flow sensor node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "dimmable-light", matter_client
|
||||
hass, "dimmable_light", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ async def eve_weather_sensor_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a Eve Weather sensor node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "eve-weather-sensor", matter_client
|
||||
hass, "eve_weather_sensor", matter_client
|
||||
)
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@ async def dimmable_light_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a dimmable light node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "dimmable-light", matter_client
|
||||
hass, "dimmable_light", matter_client
|
||||
)
|
||||
|
||||
|
||||
|
@ -23,7 +23,7 @@ async def flow_sensor_node_fixture(
|
||||
hass: HomeAssistant, matter_client: MagicMock
|
||||
) -> MatterNode:
|
||||
"""Fixture for a flow sensor node."""
|
||||
return await setup_integration_with_node_fixture(hass, "flow-sensor", matter_client)
|
||||
return await setup_integration_with_node_fixture(hass, "flow_sensor", matter_client)
|
||||
|
||||
|
||||
@pytest.fixture(name="humidity_sensor_node")
|
||||
@ -32,7 +32,7 @@ async def humidity_sensor_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a humidity sensor node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "humidity-sensor", matter_client
|
||||
hass, "humidity_sensor", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ async def light_sensor_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a light sensor node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "light-sensor", matter_client
|
||||
hass, "light_sensor", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ async def pressure_sensor_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a pressure sensor node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "pressure-sensor", matter_client
|
||||
hass, "pressure_sensor", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -62,7 +62,7 @@ async def temperature_sensor_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a temperature sensor node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "temperature-sensor", matter_client
|
||||
hass, "temperature_sensor", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ async def eve_energy_plug_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a Eve Energy Plug node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "eve-energy-plug", matter_client
|
||||
hass, "eve_energy_plug", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -81,7 +81,7 @@ async def eve_thermo_node_fixture(
|
||||
hass: HomeAssistant, matter_client: MagicMock
|
||||
) -> MatterNode:
|
||||
"""Fixture for a Eve Thermo node."""
|
||||
return await setup_integration_with_node_fixture(hass, "eve-thermo", matter_client)
|
||||
return await setup_integration_with_node_fixture(hass, "eve_thermo", matter_client)
|
||||
|
||||
|
||||
@pytest.fixture(name="eve_energy_plug_patched_node")
|
||||
@ -90,7 +90,7 @@ async def eve_energy_plug_patched_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a Eve Energy Plug node (patched to include Matter 1.3 energy clusters)."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "eve-energy-plug-patched", matter_client
|
||||
hass, "eve_energy_plug_patched", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -100,7 +100,7 @@ async def eve_weather_sensor_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a Eve Weather sensor node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "eve-weather-sensor", matter_client
|
||||
hass, "eve_weather_sensor", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ async def air_quality_sensor_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for an air quality sensor (LightFi AQ1) node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "air-quality-sensor", matter_client
|
||||
hass, "air_quality_sensor", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -120,7 +120,7 @@ async def air_purifier_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for an air purifier node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "air-purifier", matter_client
|
||||
hass, "air_purifier", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -130,7 +130,7 @@ async def dishwasher_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for an dishwasher node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "silabs-dishwasher", matter_client
|
||||
hass, "silabs_dishwasher", matter_client
|
||||
)
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@ async def powerplug_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a Powerplug node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "on-off-plugin-unit", matter_client
|
||||
hass, "on_off_plugin_unit", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ async def switch_unit_fixture(
|
||||
hass: HomeAssistant, matter_client: MagicMock
|
||||
) -> MatterNode:
|
||||
"""Fixture for a Switch Unit node."""
|
||||
return await setup_integration_with_node_fixture(hass, "switch-unit", matter_client)
|
||||
return await setup_integration_with_node_fixture(hass, "switch_unit", matter_client)
|
||||
|
||||
|
||||
# This tests needs to be adjusted to remove lingering tasks
|
||||
@ -123,7 +123,7 @@ async def test_power_switch(
|
||||
) -> None:
|
||||
"""Test if a Power switch entity is created for a device that supports that."""
|
||||
await setup_integration_with_node_fixture(
|
||||
hass, "room-airconditioner", matter_client
|
||||
hass, "room_airconditioner", matter_client
|
||||
)
|
||||
state = hass.states.get("switch.room_airconditioner_power")
|
||||
assert state
|
||||
|
@ -84,7 +84,7 @@ async def updateable_node_fixture(
|
||||
) -> MatterNode:
|
||||
"""Fixture for a flow sensor node."""
|
||||
return await setup_integration_with_node_fixture(
|
||||
hass, "dimmable-light", matter_client
|
||||
hass, "dimmable_light", matter_client
|
||||
)
|
||||
|
||||
|
||||
@ -392,7 +392,7 @@ async def test_update_state_restore(
|
||||
),
|
||||
),
|
||||
)
|
||||
await setup_integration_with_node_fixture(hass, "dimmable-light", matter_client)
|
||||
await setup_integration_with_node_fixture(hass, "dimmable_light", matter_client)
|
||||
|
||||
assert check_node_update.call_count == 0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user