1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-25 05:26:47 +00:00

Add device fixtures and tests for HomeWizard Energy 3-phase kWh meter (#104118)

This commit is contained in:
Franck Nijhof
2023-11-17 11:47:42 +01:00
committed by GitHub
parent cf9299df59
commit b3ceb82700
10 changed files with 999 additions and 2 deletions

View File

@@ -91,6 +91,21 @@ pytestmark = [
"sensor.device_active_power_phase_1",
],
),
(
"SDM630",
[
"sensor.device_wi_fi_ssid",
"sensor.device_wi_fi_strength",
"sensor.device_total_energy_import",
"sensor.device_total_energy_import_tariff_1",
"sensor.device_total_energy_export",
"sensor.device_total_energy_export_tariff_1",
"sensor.device_active_power",
"sensor.device_active_power_phase_1",
"sensor.device_active_power_phase_2",
"sensor.device_active_power_phase_3",
],
),
],
)
async def test_sensors(
@@ -151,6 +166,12 @@ async def test_sensors(
"sensor.device_wi_fi_strength",
],
),
(
"SDM630",
[
"sensor.device_wi_fi_strength",
],
),
],
)
async def test_disabled_by_default_sensors(
@@ -266,6 +287,42 @@ async def test_sensors_unreachable(
"sensor.device_voltage_swells_detected_phase_3",
],
),
(
"SDM630",
[
"sensor.device_active_average_demand",
"sensor.device_active_current_phase_1",
"sensor.device_active_current_phase_2",
"sensor.device_active_current_phase_3",
"sensor.device_active_frequency",
"sensor.device_active_tariff",
"sensor.device_active_voltage_phase_1",
"sensor.device_active_voltage_phase_2",
"sensor.device_active_voltage_phase_3",
"sensor.device_active_water_usage",
"sensor.device_dsmr_version",
"sensor.device_gas_meter_identifier",
"sensor.device_long_power_failures_detected",
"sensor.device_peak_demand_current_month",
"sensor.device_power_failures_detected",
"sensor.device_smart_meter_identifier",
"sensor.device_smart_meter_model",
"sensor.device_total_energy_export_tariff_2",
"sensor.device_total_energy_export_tariff_3",
"sensor.device_total_energy_export_tariff_4",
"sensor.device_total_energy_import_tariff_2",
"sensor.device_total_energy_import_tariff_3",
"sensor.device_total_energy_import_tariff_4",
"sensor.device_total_gas",
"sensor.device_total_water_usage",
"sensor.device_voltage_sags_detected_phase_1",
"sensor.device_voltage_sags_detected_phase_2",
"sensor.device_voltage_sags_detected_phase_3",
"sensor.device_voltage_swells_detected_phase_1",
"sensor.device_voltage_swells_detected_phase_2",
"sensor.device_voltage_swells_detected_phase_3",
],
),
],
)
async def test_entities_not_created_for_device(