diff --git a/tests/components/homewizard/fixtures/HWE-SKT/data.json b/tests/components/homewizard/fixtures/HWE-SKT/data.json index 7e64795298256d..f2a465bd40dc21 100644 --- a/tests/components/homewizard/fixtures/HWE-SKT/data.json +++ b/tests/components/homewizard/fixtures/HWE-SKT/data.json @@ -1,46 +1,8 @@ { "wifi_ssid": "My Wi-Fi", "wifi_strength": 94, - "smr_version": null, - "meter_model": null, - "unique_meter_id": null, - "active_tariff": null, - "total_power_import_kwh": null, "total_power_import_t1_kwh": 63.651, - "total_power_import_t2_kwh": null, - "total_power_import_t3_kwh": null, - "total_power_import_t4_kwh": null, - "total_power_export_kwh": null, "total_power_export_t1_kwh": 0, - "total_power_export_t2_kwh": null, - "total_power_export_t3_kwh": null, - "total_power_export_t4_kwh": null, "active_power_w": 1457.277, - "active_power_l1_w": 1457.277, - "active_power_l2_w": null, - "active_power_l3_w": null, - "active_voltage_l1_v": null, - "active_voltage_l2_v": null, - "active_voltage_l3_v": null, - "active_current_l1_a": null, - "active_current_l2_a": null, - "active_current_l3_a": null, - "active_frequency_hz": null, - "voltage_sag_l1_count": null, - "voltage_sag_l2_count": null, - "voltage_sag_l3_count": null, - "voltage_swell_l1_count": null, - "voltage_swell_l2_count": null, - "voltage_swell_l3_count": null, - "any_power_fail_count": null, - "long_power_fail_count": null, - "active_power_average_w": null, - "monthly_power_peak_w": null, - "monthly_power_peak_timestamp": null, - "total_gas_m3": null, - "gas_timestamp": null, - "gas_unique_id": null, - "active_liter_lpm": null, - "total_liter_m3": null, - "external_devices": null + "active_power_l1_w": 1457.277 } diff --git a/tests/components/homewizard/fixtures/HWE-WTR/data.json b/tests/components/homewizard/fixtures/HWE-WTR/data.json index 169528abef4fa8..16097742891e07 100644 --- a/tests/components/homewizard/fixtures/HWE-WTR/data.json +++ b/tests/components/homewizard/fixtures/HWE-WTR/data.json @@ -1,46 +1,6 @@ { "wifi_ssid": "My Wi-Fi", "wifi_strength": 84, - "smr_version": null, - "meter_model": null, - "unique_meter_id": null, - "active_tariff": null, - "total_power_import_kwh": null, - "total_power_import_t1_kwh": null, - "total_power_import_t2_kwh": null, - "total_power_import_t3_kwh": null, - "total_power_import_t4_kwh": null, - "total_power_export_kwh": null, - "total_power_export_t1_kwh": null, - "total_power_export_t2_kwh": null, - "total_power_export_t3_kwh": null, - "total_power_export_t4_kwh": null, - "active_power_w": null, - "active_power_l1_w": null, - "active_power_l2_w": null, - "active_power_l3_w": null, - "active_voltage_l1_v": null, - "active_voltage_l2_v": null, - "active_voltage_l3_v": null, - "active_current_l1_a": null, - "active_current_l2_a": null, - "active_current_l3_a": null, - "active_frequency_hz": null, - "voltage_sag_l1_count": null, - "voltage_sag_l2_count": null, - "voltage_sag_l3_count": null, - "voltage_swell_l1_count": null, - "voltage_swell_l2_count": null, - "voltage_swell_l3_count": null, - "any_power_fail_count": null, - "long_power_fail_count": null, - "active_power_average_w": null, - "monthly_power_peak_w": null, - "monthly_power_peak_timestamp": null, - "total_gas_m3": null, - "gas_timestamp": null, - "gas_unique_id": null, "active_liter_lpm": 0, - "total_liter_m3": 17.014, - "external_devices": null + "total_liter_m3": 17.014 } diff --git a/tests/components/homewizard/fixtures/SDM230/data.json b/tests/components/homewizard/fixtures/SDM230/data.json index e4eb045dff2b8c..64fb253335919b 100644 --- a/tests/components/homewizard/fixtures/SDM230/data.json +++ b/tests/components/homewizard/fixtures/SDM230/data.json @@ -1,46 +1,8 @@ { "wifi_ssid": "My Wi-Fi", "wifi_strength": 92, - "smr_version": null, - "meter_model": null, - "unique_meter_id": null, - "active_tariff": null, - "total_power_import_kwh": 2.705, "total_power_import_t1_kwh": 2.705, - "total_power_import_t2_kwh": null, - "total_power_import_t3_kwh": null, - "total_power_import_t4_kwh": null, - "total_power_export_kwh": 255.551, "total_power_export_t1_kwh": 255.551, - "total_power_export_t2_kwh": null, - "total_power_export_t3_kwh": null, - "total_power_export_t4_kwh": null, "active_power_w": -1058.296, - "active_power_l1_w": -1058.296, - "active_power_l2_w": null, - "active_power_l3_w": null, - "active_voltage_l1_v": null, - "active_voltage_l2_v": null, - "active_voltage_l3_v": null, - "active_current_l1_a": null, - "active_current_l2_a": null, - "active_current_l3_a": null, - "active_frequency_hz": null, - "voltage_sag_l1_count": null, - "voltage_sag_l2_count": null, - "voltage_sag_l3_count": null, - "voltage_swell_l1_count": null, - "voltage_swell_l2_count": null, - "voltage_swell_l3_count": null, - "any_power_fail_count": null, - "long_power_fail_count": null, - "active_power_average_w": null, - "monthly_power_peak_w": null, - "monthly_power_peak_timestamp": null, - "total_gas_m3": null, - "gas_timestamp": null, - "gas_unique_id": null, - "active_liter_lpm": null, - "total_liter_m3": null, - "external_devices": null + "active_power_l1_w": -1058.296 } diff --git a/tests/components/homewizard/fixtures/SDM630/data.json b/tests/components/homewizard/fixtures/SDM630/data.json index 593cf808efb7df..ee143220c67e4d 100644 --- a/tests/components/homewizard/fixtures/SDM630/data.json +++ b/tests/components/homewizard/fixtures/SDM630/data.json @@ -1,46 +1,10 @@ { "wifi_ssid": "My Wi-Fi", "wifi_strength": 92, - "smr_version": null, - "meter_model": null, - "unique_meter_id": null, - "active_tariff": null, - "total_power_import_kwh": 0.101, "total_power_import_t1_kwh": 0.101, - "total_power_import_t2_kwh": null, - "total_power_import_t3_kwh": null, - "total_power_import_t4_kwh": null, - "total_power_export_kwh": 0.523, "total_power_export_t1_kwh": 0.523, - "total_power_export_t2_kwh": null, - "total_power_export_t3_kwh": null, - "total_power_export_t4_kwh": null, "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": null, - "active_voltage_l2_v": null, - "active_voltage_l3_v": null, - "active_current_l1_a": null, - "active_current_l2_a": null, - "active_current_l3_a": null, - "active_frequency_hz": null, - "voltage_sag_l1_count": null, - "voltage_sag_l2_count": null, - "voltage_sag_l3_count": null, - "voltage_swell_l1_count": null, - "voltage_swell_l2_count": null, - "voltage_swell_l3_count": null, - "any_power_fail_count": null, - "long_power_fail_count": null, - "active_power_average_w": null, - "monthly_power_peak_w": null, - "monthly_power_peak_timestamp": null, - "total_gas_m3": null, - "gas_timestamp": null, - "gas_unique_id": null, - "active_liter_lpm": null, - "total_liter_m3": null, - "external_devices": null + "active_power_l3_w": 0.0 } diff --git a/tests/components/homewizard/snapshots/test_diagnostics.ambr b/tests/components/homewizard/snapshots/test_diagnostics.ambr index 4fea0c3249e38f..01094ec26980d9 100644 --- a/tests/components/homewizard/snapshots/test_diagnostics.ambr +++ b/tests/components/homewizard/snapshots/test_diagnostics.ambr @@ -95,12 +95,12 @@ 'monthly_power_peak_timestamp': None, 'monthly_power_peak_w': None, 'smr_version': None, - 'total_energy_export_kwh': None, + 'total_energy_export_kwh': 0, 'total_energy_export_t1_kwh': 0, 'total_energy_export_t2_kwh': None, 'total_energy_export_t3_kwh': None, 'total_energy_export_t4_kwh': None, - 'total_energy_import_kwh': None, + 'total_energy_import_kwh': 63.651, 'total_energy_import_t1_kwh': 63.651, 'total_energy_import_t2_kwh': None, 'total_energy_import_t3_kwh': None, diff --git a/tests/components/homewizard/snapshots/test_sensor.ambr b/tests/components/homewizard/snapshots/test_sensor.ambr index d4004604f54ff8..9e49c42ea98eda 100644 --- a/tests/components/homewizard/snapshots/test_sensor.ambr +++ b/tests/components/homewizard/snapshots/test_sensor.ambr @@ -6105,6 +6105,86 @@ 'state': '1457.277', }) # --- +# name: test_sensors[HWE-SKT-entity_ids2][sensor.device_total_energy_export:device-registry] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'configuration_url': None, + 'connections': set({ + tuple( + 'mac', + '3c:39:e7:aa:bb:cc', + ), + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'homewizard', + '3c39e7aabbcc', + ), + }), + 'is_new': False, + 'manufacturer': 'HomeWizard', + 'model': 'HWE-SKT', + 'name': 'Device', + 'name_by_user': None, + 'serial_number': None, + 'suggested_area': None, + 'sw_version': '3.03', + 'via_device_id': None, + }) +# --- +# name: test_sensors[HWE-SKT-entity_ids2][sensor.device_total_energy_export:entity-registry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.device_total_energy_export', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Total energy export', + 'platform': 'homewizard', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'total_energy_export_kwh', + 'unique_id': 'aabbccddeeff_total_power_export_kwh', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[HWE-SKT-entity_ids2][sensor.device_total_energy_export:state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'Device Total energy export', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.device_total_energy_export', + 'last_changed': , + 'last_updated': , + 'state': '0', + }) +# --- # name: test_sensors[HWE-SKT-entity_ids2][sensor.device_total_energy_export_tariff_1:device-registry] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -6185,6 +6265,86 @@ 'state': '0', }) # --- +# name: test_sensors[HWE-SKT-entity_ids2][sensor.device_total_energy_import:device-registry] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entries': , + 'configuration_url': None, + 'connections': set({ + tuple( + 'mac', + '3c:39:e7:aa:bb:cc', + ), + }), + 'disabled_by': None, + 'entry_type': None, + 'hw_version': None, + 'id': , + 'identifiers': set({ + tuple( + 'homewizard', + '3c39e7aabbcc', + ), + }), + 'is_new': False, + 'manufacturer': 'HomeWizard', + 'model': 'HWE-SKT', + 'name': 'Device', + 'name_by_user': None, + 'serial_number': None, + 'suggested_area': None, + 'sw_version': '3.03', + 'via_device_id': None, + }) +# --- +# name: test_sensors[HWE-SKT-entity_ids2][sensor.device_total_energy_import:entity-registry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'state_class': , + }), + 'config_entry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.device_total_energy_import', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'name': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Total energy import', + 'platform': 'homewizard', + 'previous_unique_id': None, + 'supported_features': 0, + 'translation_key': 'total_energy_import_kwh', + 'unique_id': 'aabbccddeeff_total_power_import_kwh', + 'unit_of_measurement': , + }) +# --- +# name: test_sensors[HWE-SKT-entity_ids2][sensor.device_total_energy_import:state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'energy', + 'friendly_name': 'Device Total energy import', + 'state_class': , + 'unit_of_measurement': , + }), + 'context': , + 'entity_id': 'sensor.device_total_energy_import', + 'last_changed': , + 'last_updated': , + 'state': '63.651', + }) +# --- # name: test_sensors[HWE-SKT-entity_ids2][sensor.device_total_energy_import_tariff_1:device-registry] DeviceRegistryEntrySnapshot({ 'area_id': None, diff --git a/tests/components/homewizard/test_sensor.py b/tests/components/homewizard/test_sensor.py index 68616685eeb92d..006f12089eedc7 100644 --- a/tests/components/homewizard/test_sensor.py +++ b/tests/components/homewizard/test_sensor.py @@ -113,7 +113,9 @@ [ "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", @@ -285,11 +287,9 @@ async def test_sensors_unreachable( "sensor.device_power_failures_detected", "sensor.device_smart_meter_identifier", "sensor.device_smart_meter_model", - "sensor.device_total_energy_export", "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", "sensor.device_total_energy_import_tariff_2", "sensor.device_total_energy_import_tariff_3", "sensor.device_total_energy_import_tariff_4",