diff --git a/tests/components/matter/conftest.py b/tests/components/matter/conftest.py index d1df9687376..0aa58945744 100644 --- a/tests/components/matter/conftest.py +++ b/tests/components/matter/conftest.py @@ -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 ) diff --git a/tests/components/matter/fixtures/nodes/air-purifier.json b/tests/components/matter/fixtures/nodes/air_purifier.json similarity index 100% rename from tests/components/matter/fixtures/nodes/air-purifier.json rename to tests/components/matter/fixtures/nodes/air_purifier.json diff --git a/tests/components/matter/fixtures/nodes/air-quality-sensor.json b/tests/components/matter/fixtures/nodes/air_quality_sensor.json similarity index 100% rename from tests/components/matter/fixtures/nodes/air-quality-sensor.json rename to tests/components/matter/fixtures/nodes/air_quality_sensor.json diff --git a/tests/components/matter/fixtures/nodes/color-temperature-light.json b/tests/components/matter/fixtures/nodes/color_temperature_light.json similarity index 100% rename from tests/components/matter/fixtures/nodes/color-temperature-light.json rename to tests/components/matter/fixtures/nodes/color_temperature_light.json diff --git a/tests/components/matter/fixtures/nodes/dimmable-light.json b/tests/components/matter/fixtures/nodes/dimmable_light.json similarity index 100% rename from tests/components/matter/fixtures/nodes/dimmable-light.json rename to tests/components/matter/fixtures/nodes/dimmable_light.json diff --git a/tests/components/matter/fixtures/nodes/dimmable-plugin-unit.json b/tests/components/matter/fixtures/nodes/dimmable_plugin_unit.json similarity index 100% rename from tests/components/matter/fixtures/nodes/dimmable-plugin-unit.json rename to tests/components/matter/fixtures/nodes/dimmable_plugin_unit.json diff --git a/tests/components/matter/fixtures/nodes/door-lock.json b/tests/components/matter/fixtures/nodes/door_lock.json similarity index 100% rename from tests/components/matter/fixtures/nodes/door-lock.json rename to tests/components/matter/fixtures/nodes/door_lock.json diff --git a/tests/components/matter/fixtures/nodes/door-lock-with-unbolt.json b/tests/components/matter/fixtures/nodes/door_lock_with_unbolt.json similarity index 100% rename from tests/components/matter/fixtures/nodes/door-lock-with-unbolt.json rename to tests/components/matter/fixtures/nodes/door_lock_with_unbolt.json diff --git a/tests/components/matter/fixtures/nodes/eve-contact-sensor.json b/tests/components/matter/fixtures/nodes/eve_contact_sensor.json similarity index 100% rename from tests/components/matter/fixtures/nodes/eve-contact-sensor.json rename to tests/components/matter/fixtures/nodes/eve_contact_sensor.json diff --git a/tests/components/matter/fixtures/nodes/eve-energy-plug.json b/tests/components/matter/fixtures/nodes/eve_energy_plug.json similarity index 100% rename from tests/components/matter/fixtures/nodes/eve-energy-plug.json rename to tests/components/matter/fixtures/nodes/eve_energy_plug.json diff --git a/tests/components/matter/fixtures/nodes/eve-energy-plug-patched.json b/tests/components/matter/fixtures/nodes/eve_energy_plug_patched.json similarity index 100% rename from tests/components/matter/fixtures/nodes/eve-energy-plug-patched.json rename to tests/components/matter/fixtures/nodes/eve_energy_plug_patched.json diff --git a/tests/components/matter/fixtures/nodes/eve-thermo.json b/tests/components/matter/fixtures/nodes/eve_thermo.json similarity index 100% rename from tests/components/matter/fixtures/nodes/eve-thermo.json rename to tests/components/matter/fixtures/nodes/eve_thermo.json diff --git a/tests/components/matter/fixtures/nodes/eve-weather-sensor.json b/tests/components/matter/fixtures/nodes/eve_weather_sensor.json similarity index 100% rename from tests/components/matter/fixtures/nodes/eve-weather-sensor.json rename to tests/components/matter/fixtures/nodes/eve_weather_sensor.json diff --git a/tests/components/matter/fixtures/nodes/extended-color-light.json b/tests/components/matter/fixtures/nodes/extended_color_light.json similarity index 100% rename from tests/components/matter/fixtures/nodes/extended-color-light.json rename to tests/components/matter/fixtures/nodes/extended_color_light.json diff --git a/tests/components/matter/fixtures/nodes/flow-sensor.json b/tests/components/matter/fixtures/nodes/flow_sensor.json similarity index 100% rename from tests/components/matter/fixtures/nodes/flow-sensor.json rename to tests/components/matter/fixtures/nodes/flow_sensor.json diff --git a/tests/components/matter/fixtures/nodes/generic-switch.json b/tests/components/matter/fixtures/nodes/generic_switch.json similarity index 100% rename from tests/components/matter/fixtures/nodes/generic-switch.json rename to tests/components/matter/fixtures/nodes/generic_switch.json diff --git a/tests/components/matter/fixtures/nodes/generic-switch-multi.json b/tests/components/matter/fixtures/nodes/generic_switch_multi.json similarity index 100% rename from tests/components/matter/fixtures/nodes/generic-switch-multi.json rename to tests/components/matter/fixtures/nodes/generic_switch_multi.json diff --git a/tests/components/matter/fixtures/nodes/humidity-sensor.json b/tests/components/matter/fixtures/nodes/humidity_sensor.json similarity index 100% rename from tests/components/matter/fixtures/nodes/humidity-sensor.json rename to tests/components/matter/fixtures/nodes/humidity_sensor.json diff --git a/tests/components/matter/fixtures/nodes/leak-sensor.json b/tests/components/matter/fixtures/nodes/leak_sensor.json similarity index 100% rename from tests/components/matter/fixtures/nodes/leak-sensor.json rename to tests/components/matter/fixtures/nodes/leak_sensor.json diff --git a/tests/components/matter/fixtures/nodes/light-sensor.json b/tests/components/matter/fixtures/nodes/light_sensor.json similarity index 100% rename from tests/components/matter/fixtures/nodes/light-sensor.json rename to tests/components/matter/fixtures/nodes/light_sensor.json diff --git a/tests/components/matter/fixtures/nodes/microwave-oven.json b/tests/components/matter/fixtures/nodes/microwave_oven.json similarity index 100% rename from tests/components/matter/fixtures/nodes/microwave-oven.json rename to tests/components/matter/fixtures/nodes/microwave_oven.json diff --git a/tests/components/matter/fixtures/nodes/multi-endpoint-light.json b/tests/components/matter/fixtures/nodes/multi_endpoint_light.json similarity index 100% rename from tests/components/matter/fixtures/nodes/multi-endpoint-light.json rename to tests/components/matter/fixtures/nodes/multi_endpoint_light.json diff --git a/tests/components/matter/fixtures/nodes/occupancy-sensor.json b/tests/components/matter/fixtures/nodes/occupancy_sensor.json similarity index 100% rename from tests/components/matter/fixtures/nodes/occupancy-sensor.json rename to tests/components/matter/fixtures/nodes/occupancy_sensor.json diff --git a/tests/components/matter/fixtures/nodes/on-off-plugin-unit.json b/tests/components/matter/fixtures/nodes/on_off_plugin_unit.json similarity index 100% rename from tests/components/matter/fixtures/nodes/on-off-plugin-unit.json rename to tests/components/matter/fixtures/nodes/on_off_plugin_unit.json diff --git a/tests/components/matter/fixtures/nodes/onoff-light.json b/tests/components/matter/fixtures/nodes/onoff_light.json similarity index 100% rename from tests/components/matter/fixtures/nodes/onoff-light.json rename to tests/components/matter/fixtures/nodes/onoff_light.json diff --git a/tests/components/matter/fixtures/nodes/onoff-light-alt-name.json b/tests/components/matter/fixtures/nodes/onoff_light_alt_name.json similarity index 100% rename from tests/components/matter/fixtures/nodes/onoff-light-alt-name.json rename to tests/components/matter/fixtures/nodes/onoff_light_alt_name.json diff --git a/tests/components/matter/fixtures/nodes/onoff-light-no-name.json b/tests/components/matter/fixtures/nodes/onoff_light_no_name.json similarity index 100% rename from tests/components/matter/fixtures/nodes/onoff-light-no-name.json rename to tests/components/matter/fixtures/nodes/onoff_light_no_name.json diff --git a/tests/components/matter/fixtures/nodes/onoff-light-with-levelcontrol-present.json b/tests/components/matter/fixtures/nodes/onoff_light_with_levelcontrol_present.json similarity index 100% rename from tests/components/matter/fixtures/nodes/onoff-light-with-levelcontrol-present.json rename to tests/components/matter/fixtures/nodes/onoff_light_with_levelcontrol_present.json diff --git a/tests/components/matter/fixtures/nodes/pressure-sensor.json b/tests/components/matter/fixtures/nodes/pressure_sensor.json similarity index 100% rename from tests/components/matter/fixtures/nodes/pressure-sensor.json rename to tests/components/matter/fixtures/nodes/pressure_sensor.json diff --git a/tests/components/matter/fixtures/nodes/room-airconditioner.json b/tests/components/matter/fixtures/nodes/room_airconditioner.json similarity index 100% rename from tests/components/matter/fixtures/nodes/room-airconditioner.json rename to tests/components/matter/fixtures/nodes/room_airconditioner.json diff --git a/tests/components/matter/fixtures/nodes/silabs-dishwasher.json b/tests/components/matter/fixtures/nodes/silabs_dishwasher.json similarity index 100% rename from tests/components/matter/fixtures/nodes/silabs-dishwasher.json rename to tests/components/matter/fixtures/nodes/silabs_dishwasher.json diff --git a/tests/components/matter/fixtures/nodes/smoke-detector.json b/tests/components/matter/fixtures/nodes/smoke_detector.json similarity index 100% rename from tests/components/matter/fixtures/nodes/smoke-detector.json rename to tests/components/matter/fixtures/nodes/smoke_detector.json diff --git a/tests/components/matter/fixtures/nodes/switch-unit.json b/tests/components/matter/fixtures/nodes/switch_unit.json similarity index 100% rename from tests/components/matter/fixtures/nodes/switch-unit.json rename to tests/components/matter/fixtures/nodes/switch_unit.json diff --git a/tests/components/matter/fixtures/nodes/temperature-sensor.json b/tests/components/matter/fixtures/nodes/temperature_sensor.json similarity index 100% rename from tests/components/matter/fixtures/nodes/temperature-sensor.json rename to tests/components/matter/fixtures/nodes/temperature_sensor.json diff --git a/tests/components/matter/fixtures/nodes/window-covering_full.json b/tests/components/matter/fixtures/nodes/window_covering_full.json similarity index 100% rename from tests/components/matter/fixtures/nodes/window-covering_full.json rename to tests/components/matter/fixtures/nodes/window_covering_full.json diff --git a/tests/components/matter/fixtures/nodes/window-covering_lift.json b/tests/components/matter/fixtures/nodes/window_covering_lift.json similarity index 100% rename from tests/components/matter/fixtures/nodes/window-covering_lift.json rename to tests/components/matter/fixtures/nodes/window_covering_lift.json diff --git a/tests/components/matter/fixtures/nodes/window-covering_pa-lift.json b/tests/components/matter/fixtures/nodes/window_covering_pa_lift.json similarity index 100% rename from tests/components/matter/fixtures/nodes/window-covering_pa-lift.json rename to tests/components/matter/fixtures/nodes/window_covering_pa_lift.json diff --git a/tests/components/matter/fixtures/nodes/window-covering_pa-tilt.json b/tests/components/matter/fixtures/nodes/window_covering_pa_tilt.json similarity index 100% rename from tests/components/matter/fixtures/nodes/window-covering_pa-tilt.json rename to tests/components/matter/fixtures/nodes/window_covering_pa_tilt.json diff --git a/tests/components/matter/fixtures/nodes/window-covering_tilt.json b/tests/components/matter/fixtures/nodes/window_covering_tilt.json similarity index 100% rename from tests/components/matter/fixtures/nodes/window-covering_tilt.json rename to tests/components/matter/fixtures/nodes/window_covering_tilt.json diff --git a/tests/components/matter/snapshots/test_binary_sensor.ambr b/tests/components/matter/snapshots/test_binary_sensor.ambr index e72f6ed2410..9161c9dc797 100644 --- a/tests/components/matter/snapshots/test_binary_sensor.ambr +++ b/tests/components/matter/snapshots/test_binary_sensor.ambr @@ -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', diff --git a/tests/components/matter/snapshots/test_sensor.ambr b/tests/components/matter/snapshots/test_sensor.ambr index 63024d3a320..a4d56769c77 100644 --- a/tests/components/matter/snapshots/test_sensor.ambr +++ b/tests/components/matter/snapshots/test_sensor.ambr @@ -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': , }) # --- -# 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': , }) # --- -# 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': , }) # --- -# 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': , }) # --- -# 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': , }) # --- -# 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': , }) # --- -# 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': , }) # --- -# 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': , }) # --- -# 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': , }) # --- -# 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': , }) # --- -# 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', diff --git a/tests/components/matter/test_adapter.py b/tests/components/matter/test_adapter.py index 63d468e02d3..b0a9d2d617e 100644 --- a/tests/components/matter/test_adapter.py +++ b/tests/components/matter/test_adapter.py @@ -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( diff --git a/tests/components/matter/test_api.py b/tests/components/matter/test_api.py index 853da113e21..828e1797af9 100644 --- a/tests/components/matter/test_api.py +++ b/tests/components/matter/test_api.py @@ -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 diff --git a/tests/components/matter/test_binary_sensor.py b/tests/components/matter/test_binary_sensor.py index e0dd445cd72..8fe962e7697 100644 --- a/tests/components/matter/test_binary_sensor.py +++ b/tests/components/matter/test_binary_sensor.py @@ -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( diff --git a/tests/components/matter/test_button.py b/tests/components/matter/test_button.py index e57a20d1533..c585671a9c1 100644 --- a/tests/components/matter/test_button.py +++ b/tests/components/matter/test_button.py @@ -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 ) diff --git a/tests/components/matter/test_climate.py b/tests/components/matter/test_climate.py index 4d6978edfde..4a7d0867d3e 100644 --- a/tests/components/matter/test_climate.py +++ b/tests/components/matter/test_climate.py @@ -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 ) diff --git a/tests/components/matter/test_cover.py b/tests/components/matter/test_cover.py index f526205234d..a989fb584b0 100644 --- a/tests/components/matter/test_cover.py +++ b/tests/components/matter/test_cover.py @@ -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" diff --git a/tests/components/matter/test_event.py b/tests/components/matter/test_event.py index 183867642f5..61effe71938 100644 --- a/tests/components/matter/test_event.py +++ b/tests/components/matter/test_event.py @@ -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 ) diff --git a/tests/components/matter/test_fan.py b/tests/components/matter/test_fan.py index 690209b1165..6cd504d4386 100644 --- a/tests/components/matter/test_fan.py +++ b/tests/components/matter/test_fan.py @@ -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 ) diff --git a/tests/components/matter/test_init.py b/tests/components/matter/test_init.py index 33df9a7ec67..5492ff29535 100644 --- a/tests/components/matter/test_init.py +++ b/tests/components/matter/test_init.py @@ -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"}) diff --git a/tests/components/matter/test_light.py b/tests/components/matter/test_light.py index 14a3a6ca97e..1fd99c6e4b9 100644 --- a/tests/components/matter/test_light.py +++ b/tests/components/matter/test_light.py @@ -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( diff --git a/tests/components/matter/test_number.py b/tests/components/matter/test_number.py index 257875d6715..047b0aa4481 100644 --- a/tests/components/matter/test_number.py +++ b/tests/components/matter/test_number.py @@ -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 ) diff --git a/tests/components/matter/test_select.py b/tests/components/matter/test_select.py index 27ce6d32c22..20b8d47db2d 100644 --- a/tests/components/matter/test_select.py +++ b/tests/components/matter/test_select.py @@ -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 ) diff --git a/tests/components/matter/test_sensor.py b/tests/components/matter/test_sensor.py index b914e2160b5..cca49437599 100644 --- a/tests/components/matter/test_sensor.py +++ b/tests/components/matter/test_sensor.py @@ -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 ) diff --git a/tests/components/matter/test_switch.py b/tests/components/matter/test_switch.py index 0327e9ea5fe..063b7a7472d 100644 --- a/tests/components/matter/test_switch.py +++ b/tests/components/matter/test_switch.py @@ -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 diff --git a/tests/components/matter/test_update.py b/tests/components/matter/test_update.py index 19c57b0f3c7..3de85be2130 100644 --- a/tests/components/matter/test_update.py +++ b/tests/components/matter/test_update.py @@ -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