Add new sensors exposed by HomeWizard kWh meter (#108850)

* Add new sensors exposed by kWh meter

* Add entity translation placeholders

* Fix Mypy issue

* Adjusts tests

* Remove suggested display precision for disabled-by-default sensors

* Update test-snapshots

* Update snapshots
This commit is contained in:
Duco Sebel 2024-01-29 14:42:16 +01:00 committed by GitHub
parent e9e289286e
commit d631cad07f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 4426 additions and 139 deletions

View file

@ -18,8 +18,10 @@ from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
ATTR_VIA_DEVICE,
PERCENTAGE,
POWER_VOLT_AMPERE_REACTIVE,
EntityCategory,
Platform,
UnitOfApparentPower,
UnitOfElectricCurrent,
UnitOfElectricPotential,
UnitOfEnergy,
@ -57,6 +59,11 @@ class HomeWizardExternalSensorEntityDescription(SensorEntityDescription):
device_name: str
def to_percentage(value: float | None) -> float | None:
"""Convert 0..1 value to percentage when value is not None."""
return value * 100 if value is not None else None
SENSORS: Final[tuple[HomeWizardSensorEntityDescription, ...]] = (
HomeWizardSensorEntityDescription(
key="smr_version",
@ -259,6 +266,15 @@ SENSORS: Final[tuple[HomeWizardSensorEntityDescription, ...]] = (
has_fn=lambda data: data.active_power_l3_w is not None,
value_fn=lambda data: data.active_power_l3_w,
),
HomeWizardSensorEntityDescription(
key="active_voltage_v",
native_unit_of_measurement=UnitOfElectricPotential.VOLT,
device_class=SensorDeviceClass.VOLTAGE,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
has_fn=lambda data: data.active_voltage_v is not None,
value_fn=lambda data: data.active_voltage_v,
),
HomeWizardSensorEntityDescription(
key="active_voltage_l1_v",
translation_key="active_voltage_phase_v",
@ -292,6 +308,15 @@ SENSORS: Final[tuple[HomeWizardSensorEntityDescription, ...]] = (
has_fn=lambda data: data.active_voltage_l3_v is not None,
value_fn=lambda data: data.active_voltage_l3_v,
),
HomeWizardSensorEntityDescription(
key="active_current_a",
native_unit_of_measurement=UnitOfElectricCurrent.AMPERE,
device_class=SensorDeviceClass.CURRENT,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
has_fn=lambda data: data.active_current_a is not None,
value_fn=lambda data: data.active_current_a,
),
HomeWizardSensorEntityDescription(
key="active_current_l1_a",
translation_key="active_current_phase_a",
@ -334,6 +359,132 @@ SENSORS: Final[tuple[HomeWizardSensorEntityDescription, ...]] = (
has_fn=lambda data: data.active_frequency_hz is not None,
value_fn=lambda data: data.active_frequency_hz,
),
HomeWizardSensorEntityDescription(
key="active_apparent_power_va",
native_unit_of_measurement=UnitOfApparentPower.VOLT_AMPERE,
device_class=SensorDeviceClass.APPARENT_POWER,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
has_fn=lambda data: data.active_apparent_power_va is not None,
value_fn=lambda data: data.active_apparent_power_va,
),
HomeWizardSensorEntityDescription(
key="active_apparent_power_l1_va",
translation_key="active_apparent_power_phase_va",
translation_placeholders={"phase": "1"},
native_unit_of_measurement=UnitOfApparentPower.VOLT_AMPERE,
device_class=SensorDeviceClass.APPARENT_POWER,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
has_fn=lambda data: data.active_apparent_power_l1_va is not None,
value_fn=lambda data: data.active_apparent_power_l1_va,
),
HomeWizardSensorEntityDescription(
key="active_apparent_power_l2_va",
translation_key="active_apparent_power_phase_va",
translation_placeholders={"phase": "2"},
native_unit_of_measurement=UnitOfApparentPower.VOLT_AMPERE,
device_class=SensorDeviceClass.APPARENT_POWER,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
has_fn=lambda data: data.active_apparent_power_l2_va is not None,
value_fn=lambda data: data.active_apparent_power_l2_va,
),
HomeWizardSensorEntityDescription(
key="active_apparent_power_l3_va",
translation_key="active_apparent_power_phase_va",
translation_placeholders={"phase": "3"},
native_unit_of_measurement=UnitOfApparentPower.VOLT_AMPERE,
device_class=SensorDeviceClass.APPARENT_POWER,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
has_fn=lambda data: data.active_apparent_power_l3_va is not None,
value_fn=lambda data: data.active_apparent_power_l3_va,
),
HomeWizardSensorEntityDescription(
key="active_reactive_power_var",
native_unit_of_measurement=POWER_VOLT_AMPERE_REACTIVE,
device_class=SensorDeviceClass.REACTIVE_POWER,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
has_fn=lambda data: data.active_reactive_power_var is not None,
value_fn=lambda data: data.active_reactive_power_var,
),
HomeWizardSensorEntityDescription(
key="active_reactive_power_l1_var",
translation_key="active_reactive_power_phase_var",
translation_placeholders={"phase": "1"},
native_unit_of_measurement=POWER_VOLT_AMPERE_REACTIVE,
device_class=SensorDeviceClass.REACTIVE_POWER,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
has_fn=lambda data: data.active_reactive_power_l1_var is not None,
value_fn=lambda data: data.active_reactive_power_l1_var,
),
HomeWizardSensorEntityDescription(
key="active_reactive_power_l2_var",
translation_key="active_reactive_power_phase_var",
translation_placeholders={"phase": "2"},
native_unit_of_measurement=POWER_VOLT_AMPERE_REACTIVE,
device_class=SensorDeviceClass.REACTIVE_POWER,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
has_fn=lambda data: data.active_reactive_power_l2_var is not None,
value_fn=lambda data: data.active_reactive_power_l2_var,
),
HomeWizardSensorEntityDescription(
key="active_reactive_power_l3_var",
translation_key="active_reactive_power_phase_var",
translation_placeholders={"phase": "3"},
native_unit_of_measurement=POWER_VOLT_AMPERE_REACTIVE,
device_class=SensorDeviceClass.REACTIVE_POWER,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
has_fn=lambda data: data.active_reactive_power_l3_var is not None,
value_fn=lambda data: data.active_reactive_power_l3_var,
),
HomeWizardSensorEntityDescription(
key="active_power_factor",
native_unit_of_measurement=PERCENTAGE,
device_class=SensorDeviceClass.POWER_FACTOR,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
has_fn=lambda data: data.active_power_factor is not None,
value_fn=lambda data: to_percentage(data.active_power_factor),
),
HomeWizardSensorEntityDescription(
key="active_power_factor_l1",
translation_key="active_power_factor_phase",
translation_placeholders={"phase": "1"},
native_unit_of_measurement=PERCENTAGE,
device_class=SensorDeviceClass.POWER_FACTOR,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
has_fn=lambda data: data.active_power_factor_l1 is not None,
value_fn=lambda data: to_percentage(data.active_power_factor_l1),
),
HomeWizardSensorEntityDescription(
key="active_power_factor_l2",
translation_key="active_power_factor_phase",
translation_placeholders={"phase": "2"},
native_unit_of_measurement=PERCENTAGE,
device_class=SensorDeviceClass.POWER_FACTOR,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
has_fn=lambda data: data.active_power_factor_l2 is not None,
value_fn=lambda data: to_percentage(data.active_power_factor_l2),
),
HomeWizardSensorEntityDescription(
key="active_power_factor_l3",
translation_key="active_power_factor_phase",
translation_placeholders={"phase": "3"},
native_unit_of_measurement=PERCENTAGE,
device_class=SensorDeviceClass.POWER_FACTOR,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
has_fn=lambda data: data.active_power_factor_l3 is not None,
value_fn=lambda data: to_percentage(data.active_power_factor_l3),
),
HomeWizardSensorEntityDescription(
key="voltage_sag_l1_count",
translation_key="voltage_sag_phase_count",

View file

@ -74,6 +74,15 @@
"active_current_phase_a": {
"name": "Current phase {phase}"
},
"active_apparent_power_phase_va": {
"name": "Apparent power phase {phase}"
},
"active_reactive_power_phase_var": {
"name": "Reactive power phase {phase}"
},
"active_power_factor_phase": {
"name": "Power factor phase {phase}"
},
"voltage_sag_phase_count": {
"name": "Voltage sags detected phase {phase}"
},

View file

@ -4,5 +4,13 @@
"total_power_import_t1_kwh": 2.705,
"total_power_export_t1_kwh": 255.551,
"active_power_w": -1058.296,
"active_power_l1_w": -1058.296
"active_power_l1_w": -1058.296,
"active_voltage_v": 228.472,
"active_current_a": 0.273,
"active_apparent_current_a": 0.447,
"active_reactive_current_a": 0.354,
"active_apparent_power_va": 74.052,
"active_reactive_power_var": -58.612,
"active_power_factor": 0.611,
"active_frequency_hz": 50
}

View file

@ -6,5 +6,32 @@
"active_power_w": -900.194,
"active_power_l1_w": -1058.296,
"active_power_l2_w": 158.102,
"active_power_l3_w": 0.0
"active_power_l3_w": 0.0,
"active_voltage_l1_v": 230.751,
"active_voltage_l2_v": 228.391,
"active_voltage_l3_v": 229.612,
"active_current_a": 30.999,
"active_current_l1_a": 0,
"active_current_l2_a": 15.521,
"active_current_l3_a": 15.477,
"active_apparent_current_a": 31.058,
"active_apparent_current_l1_a": 0,
"active_apparent_current_l2_a": 15.539,
"active_apparent_current_l3_a": 15.519,
"active_reactive_current_a": 1.872,
"active_reactive_current_l1_a": 0,
"active_reactive_current_l2_a": 0.73,
"active_reactive_current_l3_a": 1.143,
"active_apparent_power_va": 7112.293,
"active_apparent_power_l1_va": 0,
"active_apparent_power_l2_va": 3548.879,
"active_apparent_power_l3_va": 3563.414,
"active_reactive_power_var": -429.025,
"active_reactive_power_l1_var": 0,
"active_reactive_power_l2_var": -166.675,
"active_reactive_power_l3_var": -262.35,
"active_power_factor_l1": 1,
"active_power_factor_l2": 0.999,
"active_power_factor_l3": 0.997,
"active_frequency_hz": 49.926
}

View file

@ -308,15 +308,15 @@
'active_apparent_power_l1_va': None,
'active_apparent_power_l2_va': None,
'active_apparent_power_l3_va': None,
'active_apparent_power_va': None,
'active_current_a': None,
'active_apparent_power_va': 74.052,
'active_current_a': 0.273,
'active_current_l1_a': None,
'active_current_l2_a': None,
'active_current_l3_a': None,
'active_frequency_hz': None,
'active_frequency_hz': 50,
'active_liter_lpm': None,
'active_power_average_w': None,
'active_power_factor': None,
'active_power_factor': 0.611,
'active_power_factor_l1': None,
'active_power_factor_l2': None,
'active_power_factor_l3': None,
@ -327,12 +327,12 @@
'active_reactive_power_l1_var': None,
'active_reactive_power_l2_var': None,
'active_reactive_power_l3_var': None,
'active_reactive_power_var': None,
'active_reactive_power_var': -58.612,
'active_tariff': None,
'active_voltage_l1_v': None,
'active_voltage_l2_v': None,
'active_voltage_l3_v': None,
'active_voltage_v': None,
'active_voltage_v': 228.472,
'any_power_fail_count': None,
'external_devices': None,
'gas_timestamp': None,
@ -388,33 +388,33 @@
dict({
'data': dict({
'data': dict({
'active_apparent_power_l1_va': None,
'active_apparent_power_l2_va': None,
'active_apparent_power_l3_va': None,
'active_apparent_power_va': None,
'active_current_a': None,
'active_current_l1_a': None,
'active_current_l2_a': None,
'active_current_l3_a': None,
'active_frequency_hz': None,
'active_apparent_power_l1_va': 0,
'active_apparent_power_l2_va': 3548.879,
'active_apparent_power_l3_va': 3563.414,
'active_apparent_power_va': 7112.293,
'active_current_a': 30.999,
'active_current_l1_a': 0,
'active_current_l2_a': 15.521,
'active_current_l3_a': 15.477,
'active_frequency_hz': 49.926,
'active_liter_lpm': None,
'active_power_average_w': None,
'active_power_factor': None,
'active_power_factor_l1': None,
'active_power_factor_l2': None,
'active_power_factor_l3': None,
'active_power_factor_l1': 1,
'active_power_factor_l2': 0.999,
'active_power_factor_l3': 0.997,
'active_power_l1_w': -1058.296,
'active_power_l2_w': 158.102,
'active_power_l3_w': 0.0,
'active_power_w': -900.194,
'active_reactive_power_l1_var': None,
'active_reactive_power_l2_var': None,
'active_reactive_power_l3_var': None,
'active_reactive_power_var': None,
'active_reactive_power_l1_var': 0,
'active_reactive_power_l2_var': -166.675,
'active_reactive_power_l3_var': -262.35,
'active_reactive_power_var': -429.025,
'active_tariff': None,
'active_voltage_l1_v': None,
'active_voltage_l2_v': None,
'active_voltage_l3_v': None,
'active_voltage_l1_v': 230.751,
'active_voltage_l2_v': 228.391,
'active_voltage_l3_v': 229.612,
'active_voltage_v': None,
'any_power_fail_count': None,
'external_devices': None,

File diff suppressed because it is too large Load diff

View file

@ -28,131 +28,155 @@ pytestmark = [
(
"HWE-P1",
[
"sensor.device_average_demand",
"sensor.device_current_phase_1",
"sensor.device_current_phase_2",
"sensor.device_current_phase_3",
"sensor.device_dsmr_version",
"sensor.device_smart_meter_model",
"sensor.device_smart_meter_identifier",
"sensor.device_wi_fi_ssid",
"sensor.device_tariff",
"sensor.device_wi_fi_strength",
"sensor.device_energy_import",
"sensor.device_energy_import_tariff_1",
"sensor.device_energy_import_tariff_2",
"sensor.device_energy_import_tariff_3",
"sensor.device_energy_import_tariff_4",
"sensor.device_energy_export",
"sensor.device_energy_export_tariff_1",
"sensor.device_energy_export_tariff_2",
"sensor.device_energy_export_tariff_3",
"sensor.device_energy_export_tariff_4",
"sensor.device_power",
"sensor.device_energy_export",
"sensor.device_energy_import_tariff_1",
"sensor.device_energy_import_tariff_2",
"sensor.device_energy_import_tariff_3",
"sensor.device_energy_import_tariff_4",
"sensor.device_energy_import",
"sensor.device_frequency",
"sensor.device_long_power_failures_detected",
"sensor.device_peak_demand_current_month",
"sensor.device_power_failures_detected",
"sensor.device_power_phase_1",
"sensor.device_power_phase_2",
"sensor.device_power_phase_3",
"sensor.device_power",
"sensor.device_smart_meter_identifier",
"sensor.device_smart_meter_model",
"sensor.device_tariff",
"sensor.device_total_water_usage",
"sensor.device_voltage_phase_1",
"sensor.device_voltage_phase_2",
"sensor.device_voltage_phase_3",
"sensor.device_current_phase_1",
"sensor.device_current_phase_2",
"sensor.device_current_phase_3",
"sensor.device_frequency",
"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",
"sensor.device_power_failures_detected",
"sensor.device_long_power_failures_detected",
"sensor.device_average_demand",
"sensor.device_peak_demand_current_month",
"sensor.device_water_usage",
"sensor.device_total_water_usage",
"sensor.device_wi_fi_ssid",
"sensor.device_wi_fi_strength",
"sensor.gas_meter_gas",
"sensor.water_meter_water",
"sensor.warm_water_meter_water",
"sensor.heat_meter_energy",
"sensor.inlet_heat_meter_none",
"sensor.warm_water_meter_water",
"sensor.water_meter_water",
],
),
(
"HWE-P1-zero-values",
[
"sensor.device_energy_import",
"sensor.device_energy_import_tariff_1",
"sensor.device_energy_import_tariff_2",
"sensor.device_energy_import_tariff_3",
"sensor.device_energy_import_tariff_4",
"sensor.device_energy_export",
"sensor.device_average_demand",
"sensor.device_current_phase_1",
"sensor.device_current_phase_2",
"sensor.device_current_phase_3",
"sensor.device_energy_export_tariff_1",
"sensor.device_energy_export_tariff_2",
"sensor.device_energy_export_tariff_3",
"sensor.device_energy_export_tariff_4",
"sensor.device_power",
"sensor.device_energy_export",
"sensor.device_energy_import_tariff_1",
"sensor.device_energy_import_tariff_2",
"sensor.device_energy_import_tariff_3",
"sensor.device_energy_import_tariff_4",
"sensor.device_energy_import",
"sensor.device_frequency",
"sensor.device_long_power_failures_detected",
"sensor.device_power_failures_detected",
"sensor.device_power_phase_1",
"sensor.device_power_phase_2",
"sensor.device_power_phase_3",
"sensor.device_power",
"sensor.device_total_water_usage",
"sensor.device_voltage_phase_1",
"sensor.device_voltage_phase_2",
"sensor.device_voltage_phase_3",
"sensor.device_current_phase_1",
"sensor.device_current_phase_2",
"sensor.device_current_phase_3",
"sensor.device_frequency",
"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",
"sensor.device_power_failures_detected",
"sensor.device_long_power_failures_detected",
"sensor.device_average_demand",
"sensor.device_water_usage",
"sensor.device_total_water_usage",
],
),
(
"HWE-SKT",
[
"sensor.device_energy_export",
"sensor.device_energy_import",
"sensor.device_power_phase_1",
"sensor.device_power",
"sensor.device_wi_fi_ssid",
"sensor.device_wi_fi_strength",
"sensor.device_energy_import",
"sensor.device_energy_export",
"sensor.device_power",
"sensor.device_power_phase_1",
],
),
(
"HWE-WTR",
[
"sensor.device_total_water_usage",
"sensor.device_water_usage",
"sensor.device_wi_fi_ssid",
"sensor.device_wi_fi_strength",
"sensor.device_water_usage",
"sensor.device_total_water_usage",
],
),
(
"SDM230",
[
"sensor.device_apparent_power",
"sensor.device_current",
"sensor.device_energy_export",
"sensor.device_energy_import",
"sensor.device_frequency",
"sensor.device_power_factor",
"sensor.device_power",
"sensor.device_reactive_power",
"sensor.device_voltage",
"sensor.device_wi_fi_ssid",
"sensor.device_wi_fi_strength",
"sensor.device_energy_import",
"sensor.device_energy_export",
"sensor.device_power",
"sensor.device_power_phase_1",
],
),
(
"SDM630",
[
"sensor.device_wi_fi_ssid",
"sensor.device_wi_fi_strength",
"sensor.device_energy_import",
"sensor.device_apparent_power_phase_1",
"sensor.device_apparent_power_phase_2",
"sensor.device_apparent_power_phase_3",
"sensor.device_apparent_power",
"sensor.device_current_phase_1",
"sensor.device_current_phase_2",
"sensor.device_current_phase_3",
"sensor.device_current",
"sensor.device_energy_export",
"sensor.device_power",
"sensor.device_energy_import",
"sensor.device_frequency",
"sensor.device_power_factor_phase_1",
"sensor.device_power_factor_phase_2",
"sensor.device_power_factor_phase_3",
"sensor.device_power_phase_1",
"sensor.device_power_phase_2",
"sensor.device_power_phase_3",
"sensor.device_power",
"sensor.device_reactive_power_phase_1",
"sensor.device_reactive_power_phase_2",
"sensor.device_reactive_power_phase_3",
"sensor.device_reactive_power",
"sensor.device_voltage_phase_1",
"sensor.device_voltage_phase_2",
"sensor.device_voltage_phase_3",
"sensor.device_wi_fi_ssid",
"sensor.device_wi_fi_strength",
],
),
],
@ -183,24 +207,24 @@ async def test_sensors(
(
"HWE-P1",
[
"sensor.device_wi_fi_strength",
"sensor.device_voltage_phase_1",
"sensor.device_voltage_phase_2",
"sensor.device_voltage_phase_3",
"sensor.device_current_phase_1",
"sensor.device_current_phase_2",
"sensor.device_current_phase_3",
"sensor.device_frequency",
"sensor.device_voltage_phase_1",
"sensor.device_voltage_phase_2",
"sensor.device_voltage_phase_3",
"sensor.device_wi_fi_strength",
],
),
(
"HWE-P1-unused-exports",
[
"sensor.device_energy_export",
"sensor.device_energy_export_tariff_1",
"sensor.device_energy_export_tariff_2",
"sensor.device_energy_export_tariff_3",
"sensor.device_energy_export_tariff_4",
"sensor.device_energy_export",
],
),
(
@ -218,12 +242,37 @@ async def test_sensors(
(
"SDM230",
[
"sensor.device_apparent_power",
"sensor.device_current",
"sensor.device_frequency",
"sensor.device_power_factor",
"sensor.device_reactive_power",
"sensor.device_voltage",
"sensor.device_wi_fi_strength",
],
),
(
"SDM630",
[
"sensor.device_apparent_power_phase_1",
"sensor.device_apparent_power_phase_2",
"sensor.device_apparent_power_phase_3",
"sensor.device_apparent_power",
"sensor.device_current_phase_1",
"sensor.device_current_phase_2",
"sensor.device_current_phase_3",
"sensor.device_current",
"sensor.device_frequency",
"sensor.device_power_factor_phase_1",
"sensor.device_power_factor_phase_2",
"sensor.device_power_factor_phase_3",
"sensor.device_reactive_power_phase_1",
"sensor.device_reactive_power_phase_2",
"sensor.device_reactive_power_phase_3",
"sensor.device_reactive_power",
"sensor.device_voltage_phase_1",
"sensor.device_voltage_phase_2",
"sensor.device_voltage_phase_3",
"sensor.device_wi_fi_strength",
],
),
@ -281,24 +330,16 @@ async def test_external_sensors_unreachable(
(
"HWE-SKT",
[
"sensor.device_apparent_power_phase_1",
"sensor.device_apparent_power_phase_2",
"sensor.device_apparent_power_phase_3",
"sensor.device_apparent_power",
"sensor.device_average_demand",
"sensor.device_current_phase_1",
"sensor.device_current_phase_2",
"sensor.device_current_phase_3",
"sensor.device_frequency",
"sensor.device_power_phase_2",
"sensor.device_power_phase_3",
"sensor.device_tariff",
"sensor.device_voltage_phase_1",
"sensor.device_voltage_phase_2",
"sensor.device_voltage_phase_3",
"sensor.device_water_usage",
"sensor.device_current",
"sensor.device_dsmr_version",
"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_energy_export_tariff_1",
"sensor.device_energy_export_tariff_2",
"sensor.device_energy_export_tariff_3",
@ -307,76 +348,103 @@ async def test_external_sensors_unreachable(
"sensor.device_energy_import_tariff_2",
"sensor.device_energy_import_tariff_3",
"sensor.device_energy_import_tariff_4",
"sensor.device_frequency",
"sensor.device_long_power_failures_detected",
"sensor.device_peak_demand_current_month",
"sensor.device_power_factor_phase_1",
"sensor.device_power_factor_phase_2",
"sensor.device_power_factor_phase_3",
"sensor.device_power_factor",
"sensor.device_power_failures_detected",
"sensor.device_power_phase_2",
"sensor.device_power_phase_3",
"sensor.device_reactive_power_phase_1",
"sensor.device_reactive_power_phase_2",
"sensor.device_reactive_power_phase_3",
"sensor.device_reactive_power",
"sensor.device_smart_meter_identifier",
"sensor.device_smart_meter_model",
"sensor.device_tariff",
"sensor.device_total_water_usage",
"sensor.device_voltage_phase_1",
"sensor.device_voltage_phase_2",
"sensor.device_voltage_phase_3",
"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",
"sensor.device_voltage",
"sensor.device_water_usage",
],
),
(
"HWE-WTR",
[
"sensor.device_apparent_power_phase_1",
"sensor.device_apparent_power_phase_2",
"sensor.device_apparent_power_phase_3",
"sensor.device_apparent_power",
"sensor.device_average_demand",
"sensor.device_current_phase_1",
"sensor.device_current_phase_2",
"sensor.device_current_phase_3",
"sensor.device_current",
"sensor.device_dsmr_version",
"sensor.device_smart_meter_model",
"sensor.device_smart_meter_identifier",
"sensor.device_tariff",
"sensor.device_energy_import",
"sensor.device_energy_import_tariff_1",
"sensor.device_energy_import_tariff_2",
"sensor.device_energy_import_tariff_3",
"sensor.device_energy_import_tariff_4",
"sensor.device_energy_export",
"sensor.device_energy_export_tariff_1",
"sensor.device_energy_export_tariff_2",
"sensor.device_energy_export_tariff_3",
"sensor.device_energy_export_tariff_4",
"sensor.device_power",
"sensor.device_energy_export",
"sensor.device_energy_import_tariff_1",
"sensor.device_energy_import_tariff_2",
"sensor.device_energy_import_tariff_3",
"sensor.device_energy_import_tariff_4",
"sensor.device_energy_import",
"sensor.device_frequency",
"sensor.device_long_power_failures_detected",
"sensor.device_peak_demand_current_month",
"sensor.device_power_factor_phase_1",
"sensor.device_power_factor_phase_2",
"sensor.device_power_factor_phase_3",
"sensor.device_power_factor",
"sensor.device_power_failures_detected",
"sensor.device_power_phase_1",
"sensor.device_power_phase_2",
"sensor.device_power_phase_3",
"sensor.device_power",
"sensor.device_reactive_power_phase_1",
"sensor.device_reactive_power_phase_2",
"sensor.device_reactive_power_phase_3",
"sensor.device_reactive_power",
"sensor.device_smart_meter_identifier",
"sensor.device_smart_meter_model",
"sensor.device_tariff",
"sensor.device_voltage_phase_1",
"sensor.device_voltage_phase_2",
"sensor.device_voltage_phase_3",
"sensor.device_current_phase_1",
"sensor.device_current_phase_2",
"sensor.device_current_phase_3",
"sensor.device_frequency",
"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",
"sensor.device_power_failures_detected",
"sensor.device_long_power_failures_detected",
"sensor.device_average_demand",
"sensor.device_peak_demand_current_month",
"sensor.device_voltage",
],
),
(
"SDM230",
[
"sensor.device_apparent_power_phase_1",
"sensor.device_apparent_power_phase_2",
"sensor.device_apparent_power_phase_3",
"sensor.device_average_demand",
"sensor.device_average_demand",
"sensor.device_current_phase_1",
"sensor.device_current_phase_2",
"sensor.device_current_phase_3",
"sensor.device_frequency",
"sensor.device_power_phase_2",
"sensor.device_power_phase_3",
"sensor.device_tariff",
"sensor.device_voltage_phase_1",
"sensor.device_voltage_phase_2",
"sensor.device_voltage_phase_3",
"sensor.device_water_usage",
"sensor.device_dsmr_version",
"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_energy_export_tariff_1",
"sensor.device_energy_export_tariff_2",
"sensor.device_energy_export_tariff_3",
@ -385,13 +453,32 @@ async def test_external_sensors_unreachable(
"sensor.device_energy_import_tariff_2",
"sensor.device_energy_import_tariff_3",
"sensor.device_energy_import_tariff_4",
"sensor.device_frequency",
"sensor.device_long_power_failures_detected",
"sensor.device_peak_demand_current_month",
"sensor.device_power_factor_phase_1",
"sensor.device_power_factor_phase_2",
"sensor.device_power_factor_phase_3",
"sensor.device_power_failures_detected",
"sensor.device_power_phase_2",
"sensor.device_power_phase_3",
"sensor.device_reactive_power_phase_1",
"sensor.device_reactive_power_phase_2",
"sensor.device_reactive_power_phase_3",
"sensor.device_smart_meter_identifier",
"sensor.device_smart_meter_model",
"sensor.device_tariff",
"sensor.device_total_water_usage",
"sensor.device_voltage_phase_1",
"sensor.device_voltage_phase_2",
"sensor.device_voltage_phase_3",
"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",
"sensor.device_water_usage",
],
),
(
@ -401,18 +488,7 @@ async def test_external_sensors_unreachable(
"sensor.device_current_phase_1",
"sensor.device_current_phase_2",
"sensor.device_current_phase_3",
"sensor.device_frequency",
"sensor.device_tariff",
"sensor.device_voltage_phase_1",
"sensor.device_voltage_phase_2",
"sensor.device_voltage_phase_3",
"sensor.device_water_usage",
"sensor.device_dsmr_version",
"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_energy_export_tariff_1",
"sensor.device_energy_export_tariff_2",
"sensor.device_energy_export_tariff_3",
@ -421,13 +497,25 @@ async def test_external_sensors_unreachable(
"sensor.device_energy_import_tariff_2",
"sensor.device_energy_import_tariff_3",
"sensor.device_energy_import_tariff_4",
"sensor.device_frequency",
"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_tariff",
"sensor.device_total_water_usage",
"sensor.device_voltage_phase_1",
"sensor.device_voltage_phase_2",
"sensor.device_voltage_phase_3",
"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",
"sensor.device_voltage",
"sensor.device_water_usage",
],
),
],