Remove duplicate sensors on single phase HomeWizard meters (#104493)
Co-authored-by: Duco Sebel <74970928+DCSBL@users.noreply.github.com>
This commit is contained in:
parent
4a5b1ab301
commit
32eab2c7ed
3 changed files with 16 additions and 488 deletions
|
@ -114,7 +114,11 @@ SENSORS: Final[tuple[HomeWizardSensorEntityDescription, ...]] = (
|
||||||
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
||||||
device_class=SensorDeviceClass.ENERGY,
|
device_class=SensorDeviceClass.ENERGY,
|
||||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
has_fn=lambda data: data.total_energy_import_t1_kwh is not None,
|
has_fn=lambda data: (
|
||||||
|
# SKT/SDM230/630 provides both total and tariff 1: duplicate.
|
||||||
|
data.total_energy_import_t1_kwh is not None
|
||||||
|
and data.total_energy_export_t2_kwh is not None
|
||||||
|
),
|
||||||
value_fn=lambda data: data.total_energy_import_t1_kwh,
|
value_fn=lambda data: data.total_energy_import_t1_kwh,
|
||||||
),
|
),
|
||||||
HomeWizardSensorEntityDescription(
|
HomeWizardSensorEntityDescription(
|
||||||
|
@ -160,7 +164,11 @@ SENSORS: Final[tuple[HomeWizardSensorEntityDescription, ...]] = (
|
||||||
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
|
||||||
device_class=SensorDeviceClass.ENERGY,
|
device_class=SensorDeviceClass.ENERGY,
|
||||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
has_fn=lambda data: data.total_energy_export_t1_kwh is not None,
|
has_fn=lambda data: (
|
||||||
|
# SKT/SDM230/630 provides both total and tariff 1: duplicate.
|
||||||
|
data.total_energy_export_t1_kwh is not None
|
||||||
|
and data.total_energy_export_t2_kwh is not None
|
||||||
|
),
|
||||||
enabled_fn=lambda data: data.total_energy_export_t1_kwh != 0,
|
enabled_fn=lambda data: data.total_energy_export_t1_kwh != 0,
|
||||||
value_fn=lambda data: data.total_energy_export_t1_kwh,
|
value_fn=lambda data: data.total_energy_export_t1_kwh,
|
||||||
),
|
),
|
||||||
|
|
|
@ -6185,86 +6185,6 @@
|
||||||
'state': '0',
|
'state': '0',
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
# name: test_sensors[HWE-SKT-entity_ids2][sensor.device_total_energy_export_tariff_1: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_tariff_1: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_tariff_1',
|
|
||||||
'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 tariff 1',
|
|
||||||
'platform': 'homewizard',
|
|
||||||
'previous_unique_id': None,
|
|
||||||
'supported_features': 0,
|
|
||||||
'translation_key': 'total_energy_export_t1_kwh',
|
|
||||||
'unique_id': 'aabbccddeeff_total_power_export_t1_kwh',
|
|
||||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[HWE-SKT-entity_ids2][sensor.device_total_energy_export_tariff_1:state]
|
|
||||||
StateSnapshot({
|
|
||||||
'attributes': ReadOnlyDict({
|
|
||||||
'device_class': 'energy',
|
|
||||||
'friendly_name': 'Device Total energy export tariff 1',
|
|
||||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
|
||||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
|
||||||
}),
|
|
||||||
'context': <ANY>,
|
|
||||||
'entity_id': 'sensor.device_total_energy_export_tariff_1',
|
|
||||||
'last_changed': <ANY>,
|
|
||||||
'last_updated': <ANY>,
|
|
||||||
'state': '0',
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[HWE-SKT-entity_ids2][sensor.device_total_energy_import:device-registry]
|
# name: test_sensors[HWE-SKT-entity_ids2][sensor.device_total_energy_import:device-registry]
|
||||||
DeviceRegistryEntrySnapshot({
|
DeviceRegistryEntrySnapshot({
|
||||||
'area_id': None,
|
'area_id': None,
|
||||||
|
@ -6345,86 +6265,6 @@
|
||||||
'state': '63.651',
|
'state': '63.651',
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
# name: test_sensors[HWE-SKT-entity_ids2][sensor.device_total_energy_import_tariff_1: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_tariff_1: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_tariff_1',
|
|
||||||
'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 tariff 1',
|
|
||||||
'platform': 'homewizard',
|
|
||||||
'previous_unique_id': None,
|
|
||||||
'supported_features': 0,
|
|
||||||
'translation_key': 'total_energy_import_t1_kwh',
|
|
||||||
'unique_id': 'aabbccddeeff_total_power_import_t1_kwh',
|
|
||||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[HWE-SKT-entity_ids2][sensor.device_total_energy_import_tariff_1:state]
|
|
||||||
StateSnapshot({
|
|
||||||
'attributes': ReadOnlyDict({
|
|
||||||
'device_class': 'energy',
|
|
||||||
'friendly_name': 'Device Total energy import tariff 1',
|
|
||||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
|
||||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
|
||||||
}),
|
|
||||||
'context': <ANY>,
|
|
||||||
'entity_id': 'sensor.device_total_energy_import_tariff_1',
|
|
||||||
'last_changed': <ANY>,
|
|
||||||
'last_updated': <ANY>,
|
|
||||||
'state': '63.651',
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[HWE-SKT-entity_ids2][sensor.device_wi_fi_ssid:device-registry]
|
# name: test_sensors[HWE-SKT-entity_ids2][sensor.device_wi_fi_ssid:device-registry]
|
||||||
DeviceRegistryEntrySnapshot({
|
DeviceRegistryEntrySnapshot({
|
||||||
'area_id': None,
|
'area_id': None,
|
||||||
|
@ -7144,86 +6984,6 @@
|
||||||
'state': '255.551',
|
'state': '255.551',
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
# name: test_sensors[SDM230-entity_ids4][sensor.device_total_energy_export_tariff_1: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': 'SDM230-wifi',
|
|
||||||
'name': 'Device',
|
|
||||||
'name_by_user': None,
|
|
||||||
'serial_number': None,
|
|
||||||
'suggested_area': None,
|
|
||||||
'sw_version': '3.06',
|
|
||||||
'via_device_id': None,
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[SDM230-entity_ids4][sensor.device_total_energy_export_tariff_1: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_tariff_1',
|
|
||||||
'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 tariff 1',
|
|
||||||
'platform': 'homewizard',
|
|
||||||
'previous_unique_id': None,
|
|
||||||
'supported_features': 0,
|
|
||||||
'translation_key': 'total_energy_export_t1_kwh',
|
|
||||||
'unique_id': 'aabbccddeeff_total_power_export_t1_kwh',
|
|
||||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[SDM230-entity_ids4][sensor.device_total_energy_export_tariff_1:state]
|
|
||||||
StateSnapshot({
|
|
||||||
'attributes': ReadOnlyDict({
|
|
||||||
'device_class': 'energy',
|
|
||||||
'friendly_name': 'Device Total energy export tariff 1',
|
|
||||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
|
||||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
|
||||||
}),
|
|
||||||
'context': <ANY>,
|
|
||||||
'entity_id': 'sensor.device_total_energy_export_tariff_1',
|
|
||||||
'last_changed': <ANY>,
|
|
||||||
'last_updated': <ANY>,
|
|
||||||
'state': '255.551',
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[SDM230-entity_ids4][sensor.device_total_energy_import:device-registry]
|
# name: test_sensors[SDM230-entity_ids4][sensor.device_total_energy_import:device-registry]
|
||||||
DeviceRegistryEntrySnapshot({
|
DeviceRegistryEntrySnapshot({
|
||||||
'area_id': None,
|
'area_id': None,
|
||||||
|
@ -7304,86 +7064,6 @@
|
||||||
'state': '2.705',
|
'state': '2.705',
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
# name: test_sensors[SDM230-entity_ids4][sensor.device_total_energy_import_tariff_1: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': 'SDM230-wifi',
|
|
||||||
'name': 'Device',
|
|
||||||
'name_by_user': None,
|
|
||||||
'serial_number': None,
|
|
||||||
'suggested_area': None,
|
|
||||||
'sw_version': '3.06',
|
|
||||||
'via_device_id': None,
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[SDM230-entity_ids4][sensor.device_total_energy_import_tariff_1: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_tariff_1',
|
|
||||||
'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 tariff 1',
|
|
||||||
'platform': 'homewizard',
|
|
||||||
'previous_unique_id': None,
|
|
||||||
'supported_features': 0,
|
|
||||||
'translation_key': 'total_energy_import_t1_kwh',
|
|
||||||
'unique_id': 'aabbccddeeff_total_power_import_t1_kwh',
|
|
||||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[SDM230-entity_ids4][sensor.device_total_energy_import_tariff_1:state]
|
|
||||||
StateSnapshot({
|
|
||||||
'attributes': ReadOnlyDict({
|
|
||||||
'device_class': 'energy',
|
|
||||||
'friendly_name': 'Device Total energy import tariff 1',
|
|
||||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
|
||||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
|
||||||
}),
|
|
||||||
'context': <ANY>,
|
|
||||||
'entity_id': 'sensor.device_total_energy_import_tariff_1',
|
|
||||||
'last_changed': <ANY>,
|
|
||||||
'last_updated': <ANY>,
|
|
||||||
'state': '2.705',
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[SDM230-entity_ids4][sensor.device_wi_fi_ssid:device-registry]
|
# name: test_sensors[SDM230-entity_ids4][sensor.device_wi_fi_ssid:device-registry]
|
||||||
DeviceRegistryEntrySnapshot({
|
DeviceRegistryEntrySnapshot({
|
||||||
'area_id': None,
|
'area_id': None,
|
||||||
|
@ -7952,86 +7632,6 @@
|
||||||
'state': '0.523',
|
'state': '0.523',
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
# name: test_sensors[SDM630-entity_ids5][sensor.device_total_energy_export_tariff_1: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': 'SDM630-wifi',
|
|
||||||
'name': 'Device',
|
|
||||||
'name_by_user': None,
|
|
||||||
'serial_number': None,
|
|
||||||
'suggested_area': None,
|
|
||||||
'sw_version': '3.06',
|
|
||||||
'via_device_id': None,
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[SDM630-entity_ids5][sensor.device_total_energy_export_tariff_1: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_tariff_1',
|
|
||||||
'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 tariff 1',
|
|
||||||
'platform': 'homewizard',
|
|
||||||
'previous_unique_id': None,
|
|
||||||
'supported_features': 0,
|
|
||||||
'translation_key': 'total_energy_export_t1_kwh',
|
|
||||||
'unique_id': 'aabbccddeeff_total_power_export_t1_kwh',
|
|
||||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[SDM630-entity_ids5][sensor.device_total_energy_export_tariff_1:state]
|
|
||||||
StateSnapshot({
|
|
||||||
'attributes': ReadOnlyDict({
|
|
||||||
'device_class': 'energy',
|
|
||||||
'friendly_name': 'Device Total energy export tariff 1',
|
|
||||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
|
||||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
|
||||||
}),
|
|
||||||
'context': <ANY>,
|
|
||||||
'entity_id': 'sensor.device_total_energy_export_tariff_1',
|
|
||||||
'last_changed': <ANY>,
|
|
||||||
'last_updated': <ANY>,
|
|
||||||
'state': '0.523',
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[SDM630-entity_ids5][sensor.device_total_energy_import:device-registry]
|
# name: test_sensors[SDM630-entity_ids5][sensor.device_total_energy_import:device-registry]
|
||||||
DeviceRegistryEntrySnapshot({
|
DeviceRegistryEntrySnapshot({
|
||||||
'area_id': None,
|
'area_id': None,
|
||||||
|
@ -8112,86 +7712,6 @@
|
||||||
'state': '0.101',
|
'state': '0.101',
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
# name: test_sensors[SDM630-entity_ids5][sensor.device_total_energy_import_tariff_1: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': 'SDM630-wifi',
|
|
||||||
'name': 'Device',
|
|
||||||
'name_by_user': None,
|
|
||||||
'serial_number': None,
|
|
||||||
'suggested_area': None,
|
|
||||||
'sw_version': '3.06',
|
|
||||||
'via_device_id': None,
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[SDM630-entity_ids5][sensor.device_total_energy_import_tariff_1: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_tariff_1',
|
|
||||||
'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 tariff 1',
|
|
||||||
'platform': 'homewizard',
|
|
||||||
'previous_unique_id': None,
|
|
||||||
'supported_features': 0,
|
|
||||||
'translation_key': 'total_energy_import_t1_kwh',
|
|
||||||
'unique_id': 'aabbccddeeff_total_power_import_t1_kwh',
|
|
||||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[SDM630-entity_ids5][sensor.device_total_energy_import_tariff_1:state]
|
|
||||||
StateSnapshot({
|
|
||||||
'attributes': ReadOnlyDict({
|
|
||||||
'device_class': 'energy',
|
|
||||||
'friendly_name': 'Device Total energy import tariff 1',
|
|
||||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
|
||||||
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
|
|
||||||
}),
|
|
||||||
'context': <ANY>,
|
|
||||||
'entity_id': 'sensor.device_total_energy_import_tariff_1',
|
|
||||||
'last_changed': <ANY>,
|
|
||||||
'last_updated': <ANY>,
|
|
||||||
'state': '0.101',
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensors[SDM630-entity_ids5][sensor.device_wi_fi_ssid:device-registry]
|
# name: test_sensors[SDM630-entity_ids5][sensor.device_wi_fi_ssid:device-registry]
|
||||||
DeviceRegistryEntrySnapshot({
|
DeviceRegistryEntrySnapshot({
|
||||||
'area_id': None,
|
'area_id': None,
|
||||||
|
|
|
@ -114,9 +114,7 @@ pytestmark = [
|
||||||
"sensor.device_wi_fi_ssid",
|
"sensor.device_wi_fi_ssid",
|
||||||
"sensor.device_wi_fi_strength",
|
"sensor.device_wi_fi_strength",
|
||||||
"sensor.device_total_energy_import",
|
"sensor.device_total_energy_import",
|
||||||
"sensor.device_total_energy_import_tariff_1",
|
|
||||||
"sensor.device_total_energy_export",
|
"sensor.device_total_energy_export",
|
||||||
"sensor.device_total_energy_export_tariff_1",
|
|
||||||
"sensor.device_active_power",
|
"sensor.device_active_power",
|
||||||
"sensor.device_active_power_phase_1",
|
"sensor.device_active_power_phase_1",
|
||||||
],
|
],
|
||||||
|
@ -136,9 +134,7 @@ pytestmark = [
|
||||||
"sensor.device_wi_fi_ssid",
|
"sensor.device_wi_fi_ssid",
|
||||||
"sensor.device_wi_fi_strength",
|
"sensor.device_wi_fi_strength",
|
||||||
"sensor.device_total_energy_import",
|
"sensor.device_total_energy_import",
|
||||||
"sensor.device_total_energy_import_tariff_1",
|
|
||||||
"sensor.device_total_energy_export",
|
"sensor.device_total_energy_export",
|
||||||
"sensor.device_total_energy_export_tariff_1",
|
|
||||||
"sensor.device_active_power",
|
"sensor.device_active_power",
|
||||||
"sensor.device_active_power_phase_1",
|
"sensor.device_active_power_phase_1",
|
||||||
],
|
],
|
||||||
|
@ -149,9 +145,7 @@ pytestmark = [
|
||||||
"sensor.device_wi_fi_ssid",
|
"sensor.device_wi_fi_ssid",
|
||||||
"sensor.device_wi_fi_strength",
|
"sensor.device_wi_fi_strength",
|
||||||
"sensor.device_total_energy_import",
|
"sensor.device_total_energy_import",
|
||||||
"sensor.device_total_energy_import_tariff_1",
|
|
||||||
"sensor.device_total_energy_export",
|
"sensor.device_total_energy_export",
|
||||||
"sensor.device_total_energy_export_tariff_1",
|
|
||||||
"sensor.device_active_power",
|
"sensor.device_active_power",
|
||||||
"sensor.device_active_power_phase_1",
|
"sensor.device_active_power_phase_1",
|
||||||
"sensor.device_active_power_phase_2",
|
"sensor.device_active_power_phase_2",
|
||||||
|
@ -287,9 +281,11 @@ async def test_sensors_unreachable(
|
||||||
"sensor.device_power_failures_detected",
|
"sensor.device_power_failures_detected",
|
||||||
"sensor.device_smart_meter_identifier",
|
"sensor.device_smart_meter_identifier",
|
||||||
"sensor.device_smart_meter_model",
|
"sensor.device_smart_meter_model",
|
||||||
|
"sensor.device_total_energy_export_tariff_1",
|
||||||
"sensor.device_total_energy_export_tariff_2",
|
"sensor.device_total_energy_export_tariff_2",
|
||||||
"sensor.device_total_energy_export_tariff_3",
|
"sensor.device_total_energy_export_tariff_3",
|
||||||
"sensor.device_total_energy_export_tariff_4",
|
"sensor.device_total_energy_export_tariff_4",
|
||||||
|
"sensor.device_total_energy_import_tariff_1",
|
||||||
"sensor.device_total_energy_import_tariff_2",
|
"sensor.device_total_energy_import_tariff_2",
|
||||||
"sensor.device_total_energy_import_tariff_3",
|
"sensor.device_total_energy_import_tariff_3",
|
||||||
"sensor.device_total_energy_import_tariff_4",
|
"sensor.device_total_energy_import_tariff_4",
|
||||||
|
@ -367,9 +363,11 @@ async def test_sensors_unreachable(
|
||||||
"sensor.device_power_failures_detected",
|
"sensor.device_power_failures_detected",
|
||||||
"sensor.device_smart_meter_identifier",
|
"sensor.device_smart_meter_identifier",
|
||||||
"sensor.device_smart_meter_model",
|
"sensor.device_smart_meter_model",
|
||||||
|
"sensor.device_total_energy_export_tariff_1",
|
||||||
"sensor.device_total_energy_export_tariff_2",
|
"sensor.device_total_energy_export_tariff_2",
|
||||||
"sensor.device_total_energy_export_tariff_3",
|
"sensor.device_total_energy_export_tariff_3",
|
||||||
"sensor.device_total_energy_export_tariff_4",
|
"sensor.device_total_energy_export_tariff_4",
|
||||||
|
"sensor.device_total_energy_import_tariff_1",
|
||||||
"sensor.device_total_energy_import_tariff_2",
|
"sensor.device_total_energy_import_tariff_2",
|
||||||
"sensor.device_total_energy_import_tariff_3",
|
"sensor.device_total_energy_import_tariff_3",
|
||||||
"sensor.device_total_energy_import_tariff_4",
|
"sensor.device_total_energy_import_tariff_4",
|
||||||
|
@ -403,9 +401,11 @@ async def test_sensors_unreachable(
|
||||||
"sensor.device_power_failures_detected",
|
"sensor.device_power_failures_detected",
|
||||||
"sensor.device_smart_meter_identifier",
|
"sensor.device_smart_meter_identifier",
|
||||||
"sensor.device_smart_meter_model",
|
"sensor.device_smart_meter_model",
|
||||||
|
"sensor.device_total_energy_export_tariff_1",
|
||||||
"sensor.device_total_energy_export_tariff_2",
|
"sensor.device_total_energy_export_tariff_2",
|
||||||
"sensor.device_total_energy_export_tariff_3",
|
"sensor.device_total_energy_export_tariff_3",
|
||||||
"sensor.device_total_energy_export_tariff_4",
|
"sensor.device_total_energy_export_tariff_4",
|
||||||
|
"sensor.device_total_energy_import_tariff_1",
|
||||||
"sensor.device_total_energy_import_tariff_2",
|
"sensor.device_total_energy_import_tariff_2",
|
||||||
"sensor.device_total_energy_import_tariff_3",
|
"sensor.device_total_energy_import_tariff_3",
|
||||||
"sensor.device_total_energy_import_tariff_4",
|
"sensor.device_total_energy_import_tariff_4",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue