mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Adjust HomeWizard test fixtures to match actual devices (#104537)
This commit is contained in:
parent
e2e58c4495
commit
bd27358398
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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': <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-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': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'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': <ANY>,
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.ENERGY: 'energy'>,
|
||||
'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': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
||||
})
|
||||
# ---
|
||||
# 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': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.device_total_energy_export',
|
||||
'last_changed': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'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': <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-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': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'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': <ANY>,
|
||||
'name': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': <SensorDeviceClass.ENERGY: 'energy'>,
|
||||
'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': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
||||
})
|
||||
# ---
|
||||
# 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': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.device_total_energy_import',
|
||||
'last_changed': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '63.651',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[HWE-SKT-entity_ids2][sensor.device_total_energy_import_tariff_1:device-registry]
|
||||
DeviceRegistryEntrySnapshot({
|
||||
'area_id': None,
|
||||
|
@ -113,7 +113,9 @@ pytestmark = [
|
||||
[
|
||||
"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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user