Bumb python-homewizard-energy to 4.3.0 (#109131)
This commit is contained in:
parent
95fca44e6d
commit
41fdcce226
20 changed files with 3676 additions and 5 deletions
|
@ -7,6 +7,6 @@
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"loggers": ["homewizard_energy"],
|
"loggers": ["homewizard_energy"],
|
||||||
"quality_scale": "platinum",
|
"quality_scale": "platinum",
|
||||||
"requirements": ["python-homewizard-energy==4.2.2"],
|
"requirements": ["python-homewizard-energy==4.3.0"],
|
||||||
"zeroconf": ["_hwenergy._tcp.local."]
|
"zeroconf": ["_hwenergy._tcp.local."]
|
||||||
}
|
}
|
||||||
|
|
|
@ -2214,7 +2214,7 @@ python-gitlab==1.6.0
|
||||||
python-homeassistant-analytics==0.6.0
|
python-homeassistant-analytics==0.6.0
|
||||||
|
|
||||||
# homeassistant.components.homewizard
|
# homeassistant.components.homewizard
|
||||||
python-homewizard-energy==4.2.2
|
python-homewizard-energy==4.3.0
|
||||||
|
|
||||||
# homeassistant.components.hp_ilo
|
# homeassistant.components.hp_ilo
|
||||||
python-hpilo==4.3
|
python-hpilo==4.3
|
||||||
|
|
|
@ -1693,7 +1693,7 @@ python-fullykiosk==0.0.12
|
||||||
python-homeassistant-analytics==0.6.0
|
python-homeassistant-analytics==0.6.0
|
||||||
|
|
||||||
# homeassistant.components.homewizard
|
# homeassistant.components.homewizard
|
||||||
python-homewizard-energy==4.2.2
|
python-homewizard-energy==4.3.0
|
||||||
|
|
||||||
# homeassistant.components.izone
|
# homeassistant.components.izone
|
||||||
python-izone==1.2.9
|
python-izone==1.2.9
|
||||||
|
|
16
tests/components/homewizard/fixtures/HWE-KWH1/data.json
Normal file
16
tests/components/homewizard/fixtures/HWE-KWH1/data.json
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"wifi_ssid": "My Wi-Fi",
|
||||||
|
"wifi_strength": 92,
|
||||||
|
"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_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
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"product_type": "HWE-KWH1",
|
||||||
|
"product_name": "kWh meter",
|
||||||
|
"serial": "3c39e7aabbcc",
|
||||||
|
"firmware_version": "3.06",
|
||||||
|
"api_version": "v1"
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"cloud_enabled": true
|
||||||
|
}
|
37
tests/components/homewizard/fixtures/HWE-KWH3/data.json
Normal file
37
tests/components/homewizard/fixtures/HWE-KWH3/data.json
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
"wifi_ssid": "My Wi-Fi",
|
||||||
|
"wifi_strength": 92,
|
||||||
|
"total_power_import_t1_kwh": 0.101,
|
||||||
|
"total_power_export_t1_kwh": 0.523,
|
||||||
|
"active_power_w": -900.194,
|
||||||
|
"active_power_l1_w": -1058.296,
|
||||||
|
"active_power_l2_w": 158.102,
|
||||||
|
"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
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"product_type": "HWE-KWH3",
|
||||||
|
"product_name": "KWh meter 3-phase",
|
||||||
|
"serial": "3c39e7aabbcc",
|
||||||
|
"firmware_version": "3.06",
|
||||||
|
"api_version": "v1"
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"cloud_enabled": true
|
||||||
|
}
|
37
tests/components/homewizard/fixtures/SDM230/SDM630/data.json
Normal file
37
tests/components/homewizard/fixtures/SDM230/SDM630/data.json
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
"wifi_ssid": "My Wi-Fi",
|
||||||
|
"wifi_strength": 92,
|
||||||
|
"total_power_import_t1_kwh": 0.101,
|
||||||
|
"total_power_export_t1_kwh": 0.523,
|
||||||
|
"active_power_w": -900.194,
|
||||||
|
"active_power_l1_w": -1058.296,
|
||||||
|
"active_power_l2_w": 158.102,
|
||||||
|
"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
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"product_type": "SDM630-wifi",
|
||||||
|
"product_name": "KWh meter 3-phase",
|
||||||
|
"serial": "3c39e7aabbcc",
|
||||||
|
"firmware_version": "3.06",
|
||||||
|
"api_version": "v1"
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"cloud_enabled": true
|
||||||
|
}
|
|
@ -1,4 +1,170 @@
|
||||||
# serializer version: 1
|
# serializer version: 1
|
||||||
|
# name: test_diagnostics[HWE-KWH1]
|
||||||
|
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': 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': 50,
|
||||||
|
'active_liter_lpm': None,
|
||||||
|
'active_power_average_w': None,
|
||||||
|
'active_power_factor': 0.611,
|
||||||
|
'active_power_factor_l1': None,
|
||||||
|
'active_power_factor_l2': None,
|
||||||
|
'active_power_factor_l3': None,
|
||||||
|
'active_power_l1_w': -1058.296,
|
||||||
|
'active_power_l2_w': None,
|
||||||
|
'active_power_l3_w': None,
|
||||||
|
'active_power_w': -1058.296,
|
||||||
|
'active_reactive_power_l1_var': None,
|
||||||
|
'active_reactive_power_l2_var': None,
|
||||||
|
'active_reactive_power_l3_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': 228.472,
|
||||||
|
'any_power_fail_count': None,
|
||||||
|
'external_devices': None,
|
||||||
|
'gas_timestamp': None,
|
||||||
|
'gas_unique_id': None,
|
||||||
|
'long_power_fail_count': None,
|
||||||
|
'meter_model': None,
|
||||||
|
'monthly_power_peak_timestamp': None,
|
||||||
|
'monthly_power_peak_w': None,
|
||||||
|
'smr_version': None,
|
||||||
|
'total_energy_export_kwh': 255.551,
|
||||||
|
'total_energy_export_t1_kwh': 255.551,
|
||||||
|
'total_energy_export_t2_kwh': None,
|
||||||
|
'total_energy_export_t3_kwh': None,
|
||||||
|
'total_energy_export_t4_kwh': None,
|
||||||
|
'total_energy_import_kwh': 2.705,
|
||||||
|
'total_energy_import_t1_kwh': 2.705,
|
||||||
|
'total_energy_import_t2_kwh': None,
|
||||||
|
'total_energy_import_t3_kwh': None,
|
||||||
|
'total_energy_import_t4_kwh': None,
|
||||||
|
'total_gas_m3': None,
|
||||||
|
'total_liter_m3': None,
|
||||||
|
'unique_meter_id': None,
|
||||||
|
'voltage_sag_l1_count': None,
|
||||||
|
'voltage_sag_l2_count': None,
|
||||||
|
'voltage_sag_l3_count': None,
|
||||||
|
'voltage_swell_l1_count': None,
|
||||||
|
'voltage_swell_l2_count': None,
|
||||||
|
'voltage_swell_l3_count': None,
|
||||||
|
'wifi_ssid': '**REDACTED**',
|
||||||
|
'wifi_strength': 92,
|
||||||
|
}),
|
||||||
|
'device': dict({
|
||||||
|
'api_version': 'v1',
|
||||||
|
'firmware_version': '3.06',
|
||||||
|
'product_name': 'kWh meter',
|
||||||
|
'product_type': 'HWE-KWH1',
|
||||||
|
'serial': '**REDACTED**',
|
||||||
|
}),
|
||||||
|
'state': None,
|
||||||
|
'system': dict({
|
||||||
|
'cloud_enabled': True,
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
'entry': dict({
|
||||||
|
'ip_address': '**REDACTED**',
|
||||||
|
'product_name': 'Product name',
|
||||||
|
'product_type': 'product_type',
|
||||||
|
'serial': '**REDACTED**',
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_diagnostics[HWE-KWH3]
|
||||||
|
dict({
|
||||||
|
'data': dict({
|
||||||
|
'data': dict({
|
||||||
|
'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': 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': 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': 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,
|
||||||
|
'gas_timestamp': None,
|
||||||
|
'gas_unique_id': None,
|
||||||
|
'long_power_fail_count': None,
|
||||||
|
'meter_model': None,
|
||||||
|
'monthly_power_peak_timestamp': None,
|
||||||
|
'monthly_power_peak_w': None,
|
||||||
|
'smr_version': None,
|
||||||
|
'total_energy_export_kwh': 0.523,
|
||||||
|
'total_energy_export_t1_kwh': 0.523,
|
||||||
|
'total_energy_export_t2_kwh': None,
|
||||||
|
'total_energy_export_t3_kwh': None,
|
||||||
|
'total_energy_export_t4_kwh': None,
|
||||||
|
'total_energy_import_kwh': 0.101,
|
||||||
|
'total_energy_import_t1_kwh': 0.101,
|
||||||
|
'total_energy_import_t2_kwh': None,
|
||||||
|
'total_energy_import_t3_kwh': None,
|
||||||
|
'total_energy_import_t4_kwh': None,
|
||||||
|
'total_gas_m3': None,
|
||||||
|
'total_liter_m3': None,
|
||||||
|
'unique_meter_id': None,
|
||||||
|
'voltage_sag_l1_count': None,
|
||||||
|
'voltage_sag_l2_count': None,
|
||||||
|
'voltage_sag_l3_count': None,
|
||||||
|
'voltage_swell_l1_count': None,
|
||||||
|
'voltage_swell_l2_count': None,
|
||||||
|
'voltage_swell_l3_count': None,
|
||||||
|
'wifi_ssid': '**REDACTED**',
|
||||||
|
'wifi_strength': 92,
|
||||||
|
}),
|
||||||
|
'device': dict({
|
||||||
|
'api_version': 'v1',
|
||||||
|
'firmware_version': '3.06',
|
||||||
|
'product_name': 'KWh meter 3-phase',
|
||||||
|
'product_type': 'HWE-KWH3',
|
||||||
|
'serial': '**REDACTED**',
|
||||||
|
}),
|
||||||
|
'state': None,
|
||||||
|
'system': dict({
|
||||||
|
'cloud_enabled': True,
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
'entry': dict({
|
||||||
|
'ip_address': '**REDACTED**',
|
||||||
|
'product_name': 'Product name',
|
||||||
|
'product_type': 'product_type',
|
||||||
|
'serial': '**REDACTED**',
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
# ---
|
||||||
# name: test_diagnostics[HWE-P1]
|
# name: test_diagnostics[HWE-P1]
|
||||||
dict({
|
dict({
|
||||||
'data': dict({
|
'data': dict({
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,4 +1,154 @@
|
||||||
# serializer version: 1
|
# serializer version: 1
|
||||||
|
# name: test_switch_entities[HWE-KWH1-switch.device_cloud_connection-system_set-cloud_enabled]
|
||||||
|
StateSnapshot({
|
||||||
|
'attributes': ReadOnlyDict({
|
||||||
|
'friendly_name': 'Device Cloud connection',
|
||||||
|
}),
|
||||||
|
'context': <ANY>,
|
||||||
|
'entity_id': 'switch.device_cloud_connection',
|
||||||
|
'last_changed': <ANY>,
|
||||||
|
'last_updated': <ANY>,
|
||||||
|
'state': 'on',
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_switch_entities[HWE-KWH1-switch.device_cloud_connection-system_set-cloud_enabled].1
|
||||||
|
EntityRegistryEntrySnapshot({
|
||||||
|
'aliases': set({
|
||||||
|
}),
|
||||||
|
'area_id': None,
|
||||||
|
'capabilities': None,
|
||||||
|
'config_entry_id': <ANY>,
|
||||||
|
'device_class': None,
|
||||||
|
'device_id': <ANY>,
|
||||||
|
'disabled_by': None,
|
||||||
|
'domain': 'switch',
|
||||||
|
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||||
|
'entity_id': 'switch.device_cloud_connection',
|
||||||
|
'has_entity_name': True,
|
||||||
|
'hidden_by': None,
|
||||||
|
'icon': None,
|
||||||
|
'id': <ANY>,
|
||||||
|
'name': None,
|
||||||
|
'options': dict({
|
||||||
|
}),
|
||||||
|
'original_device_class': None,
|
||||||
|
'original_icon': None,
|
||||||
|
'original_name': 'Cloud connection',
|
||||||
|
'platform': 'homewizard',
|
||||||
|
'previous_unique_id': None,
|
||||||
|
'supported_features': 0,
|
||||||
|
'translation_key': 'cloud_connection',
|
||||||
|
'unique_id': 'aabbccddeeff_cloud_connection',
|
||||||
|
'unit_of_measurement': None,
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_switch_entities[HWE-KWH1-switch.device_cloud_connection-system_set-cloud_enabled].2
|
||||||
|
DeviceRegistryEntrySnapshot({
|
||||||
|
'area_id': None,
|
||||||
|
'config_entries': <ANY>,
|
||||||
|
'configuration_url': None,
|
||||||
|
'connections': set({
|
||||||
|
tuple(
|
||||||
|
'mac',
|
||||||
|
'3c:39:e7:aa:bb:cc',
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
'disabled_by': None,
|
||||||
|
'entry_type': None,
|
||||||
|
'hw_version': None,
|
||||||
|
'id': <ANY>,
|
||||||
|
'identifiers': set({
|
||||||
|
tuple(
|
||||||
|
'homewizard',
|
||||||
|
'3c39e7aabbcc',
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
'is_new': False,
|
||||||
|
'manufacturer': 'HomeWizard',
|
||||||
|
'model': 'HWE-KWH1',
|
||||||
|
'name': 'Device',
|
||||||
|
'name_by_user': None,
|
||||||
|
'serial_number': None,
|
||||||
|
'suggested_area': None,
|
||||||
|
'sw_version': '3.06',
|
||||||
|
'via_device_id': None,
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_switch_entities[HWE-KWH3-switch.device_cloud_connection-system_set-cloud_enabled]
|
||||||
|
StateSnapshot({
|
||||||
|
'attributes': ReadOnlyDict({
|
||||||
|
'friendly_name': 'Device Cloud connection',
|
||||||
|
}),
|
||||||
|
'context': <ANY>,
|
||||||
|
'entity_id': 'switch.device_cloud_connection',
|
||||||
|
'last_changed': <ANY>,
|
||||||
|
'last_updated': <ANY>,
|
||||||
|
'state': 'on',
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_switch_entities[HWE-KWH3-switch.device_cloud_connection-system_set-cloud_enabled].1
|
||||||
|
EntityRegistryEntrySnapshot({
|
||||||
|
'aliases': set({
|
||||||
|
}),
|
||||||
|
'area_id': None,
|
||||||
|
'capabilities': None,
|
||||||
|
'config_entry_id': <ANY>,
|
||||||
|
'device_class': None,
|
||||||
|
'device_id': <ANY>,
|
||||||
|
'disabled_by': None,
|
||||||
|
'domain': 'switch',
|
||||||
|
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||||
|
'entity_id': 'switch.device_cloud_connection',
|
||||||
|
'has_entity_name': True,
|
||||||
|
'hidden_by': None,
|
||||||
|
'icon': None,
|
||||||
|
'id': <ANY>,
|
||||||
|
'name': None,
|
||||||
|
'options': dict({
|
||||||
|
}),
|
||||||
|
'original_device_class': None,
|
||||||
|
'original_icon': None,
|
||||||
|
'original_name': 'Cloud connection',
|
||||||
|
'platform': 'homewizard',
|
||||||
|
'previous_unique_id': None,
|
||||||
|
'supported_features': 0,
|
||||||
|
'translation_key': 'cloud_connection',
|
||||||
|
'unique_id': 'aabbccddeeff_cloud_connection',
|
||||||
|
'unit_of_measurement': None,
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_switch_entities[HWE-KWH3-switch.device_cloud_connection-system_set-cloud_enabled].2
|
||||||
|
DeviceRegistryEntrySnapshot({
|
||||||
|
'area_id': None,
|
||||||
|
'config_entries': <ANY>,
|
||||||
|
'configuration_url': None,
|
||||||
|
'connections': set({
|
||||||
|
tuple(
|
||||||
|
'mac',
|
||||||
|
'3c:39:e7:aa:bb:cc',
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
'disabled_by': None,
|
||||||
|
'entry_type': None,
|
||||||
|
'hw_version': None,
|
||||||
|
'id': <ANY>,
|
||||||
|
'identifiers': set({
|
||||||
|
tuple(
|
||||||
|
'homewizard',
|
||||||
|
'3c39e7aabbcc',
|
||||||
|
),
|
||||||
|
}),
|
||||||
|
'is_new': False,
|
||||||
|
'manufacturer': 'HomeWizard',
|
||||||
|
'model': 'HWE-KWH3',
|
||||||
|
'name': 'Device',
|
||||||
|
'name_by_user': None,
|
||||||
|
'serial_number': None,
|
||||||
|
'suggested_area': None,
|
||||||
|
'sw_version': '3.06',
|
||||||
|
'via_device_id': None,
|
||||||
|
})
|
||||||
|
# ---
|
||||||
# name: test_switch_entities[HWE-SKT-switch.device-state_set-power_on]
|
# name: test_switch_entities[HWE-SKT-switch.device-state_set-power_on]
|
||||||
StateSnapshot({
|
StateSnapshot({
|
||||||
'attributes': ReadOnlyDict({
|
'attributes': ReadOnlyDict({
|
||||||
|
|
|
@ -17,7 +17,9 @@ pytestmark = [
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("device_fixture", ["HWE-WTR", "SDM230", "SDM630"])
|
@pytest.mark.parametrize(
|
||||||
|
"device_fixture", ["HWE-WTR", "SDM230", "SDM630", "HWE-KWH1", "HWE-KWH3"]
|
||||||
|
)
|
||||||
async def test_identify_button_entity_not_loaded_when_not_available(
|
async def test_identify_button_entity_not_loaded_when_not_available(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
|
|
@ -18,6 +18,8 @@ from tests.typing import ClientSessionGenerator
|
||||||
"HWE-WTR",
|
"HWE-WTR",
|
||||||
"SDM230",
|
"SDM230",
|
||||||
"SDM630",
|
"SDM630",
|
||||||
|
"HWE-KWH1",
|
||||||
|
"HWE-KWH3",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
async def test_diagnostics(
|
async def test_diagnostics(
|
||||||
|
|
|
@ -97,7 +97,9 @@ async def test_number_entities(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("device_fixture", ["HWE-P1", "HWE-WTR", "SDM230", "SDM630"])
|
@pytest.mark.parametrize(
|
||||||
|
"device_fixture", ["HWE-P1", "HWE-WTR", "SDM230", "SDM630", "HWE-KWH1", "HWE-KWH3"]
|
||||||
|
)
|
||||||
async def test_entities_not_created_for_device(hass: HomeAssistant) -> None:
|
async def test_entities_not_created_for_device(hass: HomeAssistant) -> None:
|
||||||
"""Does not load number when device has no support for it."""
|
"""Does not load number when device has no support for it."""
|
||||||
assert not hass.states.get("number.device_status_light_brightness")
|
assert not hass.states.get("number.device_status_light_brightness")
|
||||||
|
|
|
@ -179,6 +179,54 @@ pytestmark = [
|
||||||
"sensor.device_wi_fi_strength",
|
"sensor.device_wi_fi_strength",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
"HWE-KWH1",
|
||||||
|
[
|
||||||
|
"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",
|
||||||
|
],
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"HWE-KWH3",
|
||||||
|
[
|
||||||
|
"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_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",
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
async def test_sensors(
|
async def test_sensors(
|
||||||
|
@ -276,6 +324,43 @@ async def test_sensors(
|
||||||
"sensor.device_wi_fi_strength",
|
"sensor.device_wi_fi_strength",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
"HWE-KWH1",
|
||||||
|
[
|
||||||
|
"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",
|
||||||
|
],
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"HWE-KWH3",
|
||||||
|
[
|
||||||
|
"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",
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
async def test_disabled_by_default_sensors(
|
async def test_disabled_by_default_sensors(
|
||||||
|
@ -518,6 +603,91 @@ async def test_external_sensors_unreachable(
|
||||||
"sensor.device_water_usage",
|
"sensor.device_water_usage",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
"HWE-KWH1",
|
||||||
|
[
|
||||||
|
"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_dsmr_version",
|
||||||
|
"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_import_tariff_1",
|
||||||
|
"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",
|
||||||
|
],
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"HWE-KWH3",
|
||||||
|
[
|
||||||
|
"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_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_import_tariff_1",
|
||||||
|
"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",
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
async def test_entities_not_created_for_device(
|
async def test_entities_not_created_for_device(
|
||||||
|
|
|
@ -58,6 +58,20 @@ pytestmark = [
|
||||||
"switch.device_switch_lock",
|
"switch.device_switch_lock",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
"HWE-KWH1",
|
||||||
|
[
|
||||||
|
"switch.device",
|
||||||
|
"switch.device_switch_lock",
|
||||||
|
],
|
||||||
|
),
|
||||||
|
(
|
||||||
|
"HWE-KWH3",
|
||||||
|
[
|
||||||
|
"switch.device",
|
||||||
|
"switch.device_switch_lock",
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
async def test_entities_not_created_for_device(
|
async def test_entities_not_created_for_device(
|
||||||
|
@ -77,6 +91,8 @@ async def test_entities_not_created_for_device(
|
||||||
("HWE-SKT", "switch.device_cloud_connection", "system_set", "cloud_enabled"),
|
("HWE-SKT", "switch.device_cloud_connection", "system_set", "cloud_enabled"),
|
||||||
("SDM230", "switch.device_cloud_connection", "system_set", "cloud_enabled"),
|
("SDM230", "switch.device_cloud_connection", "system_set", "cloud_enabled"),
|
||||||
("SDM630", "switch.device_cloud_connection", "system_set", "cloud_enabled"),
|
("SDM630", "switch.device_cloud_connection", "system_set", "cloud_enabled"),
|
||||||
|
("HWE-KWH1", "switch.device_cloud_connection", "system_set", "cloud_enabled"),
|
||||||
|
("HWE-KWH3", "switch.device_cloud_connection", "system_set", "cloud_enabled"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
async def test_switch_entities(
|
async def test_switch_entities(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue