From bb82a718665ec6f7852cbd64a045f2be7433bbfb Mon Sep 17 00:00:00 2001 From: huangrenwei79 Date: Tue, 29 Sep 2026 22:50:00 +0800 Subject: [PATCH] Add Tuya indexed phase sensors as child devices (#182161) Co-authored-by: epenet <6771947+epenet@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 --- homeassistant/components/tuya/const.py | 20 + homeassistant/components/tuya/sensor.py | 104 +- .../components/tuya/snapshots/test_init.ambr | 400 + .../tuya/snapshots/test_sensor.ambr | 7476 +++++++++++++++++ tests/components/tuya/test_sensor.py | 40 +- 5 files changed, 8036 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/tuya/const.py b/homeassistant/components/tuya/const.py index 5cc1141a7f58..bb714275b4f6 100644 --- a/homeassistant/components/tuya/const.py +++ b/homeassistant/components/tuya/const.py @@ -816,6 +816,26 @@ class DPCode(StrEnum): PHASE_A = "phase_a" PHASE_B = "phase_b" PHASE_C = "phase_c" + PHASE_S1 = "phase_s1" + PHASE_S2 = "phase_s2" + PHASE_S3 = "phase_s3" + PHASE_S4 = "phase_s4" + PHASE_S5 = "phase_s5" + PHASE_S6 = "phase_s6" + PHASE_S7 = "phase_s7" + PHASE_S8 = "phase_s8" + PHASE_S9 = "phase_s9" + PHASE_S10 = "phase_s10" + PHASE_S11 = "phase_s11" + PHASE_S12 = "phase_s12" + PHASE_S13 = "phase_s13" + PHASE_S14 = "phase_s14" + PHASE_S15 = "phase_s15" + PHASE_S16 = "phase_s16" + PHASE_S17 = "phase_s17" + PHASE_S18 = "phase_s18" + PHASE_S19 = "phase_s19" + PHASE_S20 = "phase_s20" PH_CURRENT = "ph_current" PIR = "pir" # Motion sensor PM1 = "pm1" diff --git a/homeassistant/components/tuya/sensor.py b/homeassistant/components/tuya/sensor.py index 8d8d7dcf0997..3b5f5dd90c7c 100644 --- a/homeassistant/components/tuya/sensor.py +++ b/homeassistant/components/tuya/sensor.py @@ -13,16 +13,22 @@ from tuya_device_handlers.device_wrapper.common import ( ) from tuya_device_handlers.device_wrapper.sensor import ( DeltaIntegerWrapper, + ElectricityApparentPowerHexStringWrapper, ElectricityApparentPowerJsonWrapper, ElectricityApparentPowerRawWrapper, + ElectricityCurrentHexStringWrapper, ElectricityCurrentJsonWrapper, ElectricityCurrentRawWrapper, + ElectricityPowerFactorHexStringWrapper, ElectricityPowerFactorJsonWrapper, ElectricityPowerFactorRawWrapper, + ElectricityPowerHexStringWrapper, ElectricityPowerJsonWrapper, ElectricityPowerRawWrapper, + ElectricityReactivePowerHexStringWrapper, ElectricityReactivePowerJsonWrapper, ElectricityReactivePowerRawWrapper, + ElectricityVoltageHexStringWrapper, ElectricityVoltageJsonWrapper, ElectricityVoltageRawWrapper, WindDirectionEnumWrapper, @@ -47,19 +53,22 @@ from homeassistant.const import ( UnitOfTime, ) from homeassistant.core import HomeAssistant, callback +from homeassistant.helpers import device_registry as dr +from homeassistant.helpers.device_registry import ChildDeviceInfo from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback from homeassistant.helpers.typing import StateType from .const import ( DEVICE_CLASS_UNITS, + DOMAIN, LOGGER, TUYA_DISCOVERY_NEW, DeviceCategory, DPCode, ) from .coordinator import TuyaConfigEntry -from .entity import TuyaEntity, TuyaEntityDescription +from .entity import TuyaEntity, TuyaEntityDescription, get_child_device_info from .util import get_device_temp_unit_convert @@ -137,6 +146,73 @@ def _electricity_data(dpcode: DPCode) -> tuple[TuyaSensorEntityDescription, ...] ) +def _has_multiple_phase_channels(device: CustomerDevice) -> bool: + """Return if the device reports more than one indexed phase channel.""" + return DPCode.PHASE_S2 in device.status_range + + +def _indexed_electricity_data( + dpcode: DPCode, index: int +) -> tuple[TuyaSensorEntityDescription, ...]: + """Build sensors extracted from an indexed hex-string electricity DPCode.""" + return ( + TuyaSensorEntityDescription( + key=f"{dpcode}electriccurrent", + dpcode=dpcode, + device_class=SensorDeviceClass.CURRENT, + state_class=SensorStateClass.MEASUREMENT, + wrapper_class=(ElectricityCurrentHexStringWrapper,), + channel_index=index, + channel_condition=_has_multiple_phase_channels, + ), + TuyaSensorEntityDescription( + key=f"{dpcode}power", + dpcode=dpcode, + device_class=SensorDeviceClass.POWER, + state_class=SensorStateClass.MEASUREMENT, + wrapper_class=(ElectricityPowerHexStringWrapper,), + channel_index=index, + channel_condition=_has_multiple_phase_channels, + ), + TuyaSensorEntityDescription( + key=f"{dpcode}voltage", + dpcode=dpcode, + device_class=SensorDeviceClass.VOLTAGE, + state_class=SensorStateClass.MEASUREMENT, + wrapper_class=(ElectricityVoltageHexStringWrapper,), + channel_index=index, + channel_condition=_has_multiple_phase_channels, + ), + TuyaSensorEntityDescription( + key=f"{dpcode}reactivepower", + dpcode=dpcode, + device_class=SensorDeviceClass.REACTIVE_POWER, + state_class=SensorStateClass.MEASUREMENT, + wrapper_class=(ElectricityReactivePowerHexStringWrapper,), + channel_index=index, + channel_condition=_has_multiple_phase_channels, + ), + TuyaSensorEntityDescription( + key=f"{dpcode}apparentpower", + dpcode=dpcode, + device_class=SensorDeviceClass.APPARENT_POWER, + state_class=SensorStateClass.MEASUREMENT, + wrapper_class=(ElectricityApparentPowerHexStringWrapper,), + channel_index=index, + channel_condition=_has_multiple_phase_channels, + ), + TuyaSensorEntityDescription( + key=f"{dpcode}powerfactor", + dpcode=dpcode, + device_class=SensorDeviceClass.POWER_FACTOR, + state_class=SensorStateClass.MEASUREMENT, + wrapper_class=(ElectricityPowerFactorHexStringWrapper,), + channel_index=index, + channel_condition=_has_multiple_phase_channels, + ), + ) + + # Commonly used battery sensors, that are reused in the sensors down below. BATTERY_SENSORS: tuple[TuyaSensorEntityDescription, ...] = ( TuyaSensorEntityDescription( @@ -1705,6 +1781,13 @@ SENSORS: dict[DeviceCategory, tuple[TuyaSensorEntityDescription, ...]] = { *_electricity_data(DPCode.PHASE_A), *_electricity_data(DPCode.PHASE_B), *_electricity_data(DPCode.PHASE_C), + *( + description + for index in range(1, 21) + for description in _indexed_electricity_data( + DPCode(f"phase_s{index}"), index + ) + ), ), DeviceCategory.ZNJDQ: ( TuyaSensorEntityDescription( @@ -1836,8 +1919,21 @@ async def async_setup_entry( for device_id in device_ids: device = manager.device_map[device_id] if descriptions := SENSORS.get(device.category): + parent_device_id = dr.async_get_device_id_by_identifier( + hass, + (DOMAIN, device.id), + config_entry_id=entry.entry_id, + ) entities.extend( - TuyaSensorEntity(device, manager, description, definition) + TuyaSensorEntity( + device, + manager, + description, + definition, + device_info=get_child_device_info( + device, parent_device_id, description + ), + ) for description in descriptions if ( definition := get_default_definition( @@ -1868,9 +1964,11 @@ class TuyaSensorEntity(TuyaEntity, SensorEntity): device_manager: Manager, description: TuyaSensorEntityDescription, definition: SensorDefinition, + *, + device_info: ChildDeviceInfo | None = None, ) -> None: """Init Tuya sensor.""" - super().__init__(device, device_manager, description) + super().__init__(device, device_manager, description, device_info=device_info) self._dpcode_wrapper = definition.sensor_wrapper if description.suggested_unit_of_measurement is None: diff --git a/tests/components/tuya/snapshots/test_init.ambr b/tests/components/tuya/snapshots/test_init.ambr index 86ebf5e3f480..26489ad33a93 100644 --- a/tests/components/tuya/snapshots/test_init.ambr +++ b/tests/components/tuya/snapshots/test_init.ambr @@ -9009,6 +9009,406 @@ 'via_device_id': None, }) # --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_10] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_10', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 10', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_11] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_11', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 11', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_12] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_12', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 12', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_13] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_13', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 13', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_14] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_14', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 14', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_15] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_15', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 15', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_16] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_16', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 16', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_17] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_17', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 17', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_18] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_18', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 18', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_19] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_19', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 19', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_1] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_1', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 1', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_20] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_20', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 20', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_2] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_2', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 2', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_3] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_3', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 3', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_4] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_4', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 4', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_5] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_5', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 5', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_6] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_6', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 6', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_7] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_7', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 7', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_8] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_8', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 8', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- +# name: test_device_registry[wrr5fva8vgffwlxqbdnz_channel_9] + DeviceRegistryEntrySnapshot({ + 'area_id': None, + 'config_entry_id': , + 'config_subentry_id': , + 'disabled_by': None, + 'id': , + 'identifiers': set({ + tuple( + 'tuya', + 'wrr5fva8vgffwlxqbdnz_channel_9', + ), + }), + 'labels': set({ + }), + 'name': 'Channel 9', + 'name_by_user': None, + 'parent_device_id': , + }) +# --- # name: test_device_registry[x4nogasbi8ggpb3lcd] DeviceRegistryEntrySnapshot({ 'area_id': None, diff --git a/tests/components/tuya/snapshots/test_sensor.ambr b/tests/components/tuya/snapshots/test_sensor.ambr index a65f05fc3be5..7d9931e58a4d 100644 --- a/tests/components/tuya/snapshots/test_sensor.ambr +++ b/tests/components/tuya/snapshots/test_sensor.ambr @@ -5047,6 +5047,7126 @@ 'state': '0.0', }) # --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s10apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 10 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2.2', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s10electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 10 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '11.0', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s10power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 10 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2.1', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s10powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 10 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.98', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s10reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 10 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.5', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s10voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 10 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_10_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '231.0', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s11apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 11 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2.42', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s11electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 11 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '12.1', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s11power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 11 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2.31', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s11powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 11 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.99', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s11reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 11 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.55', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s11voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 11 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_11_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '231.1', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s12apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 12 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2.64', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s12electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 12 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '13.2', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s12power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 12 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2.52', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s12powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 12 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.94', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s12reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 12 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.6', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s12voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 12 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_12_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '231.2', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s13apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 13 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2.86', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s13electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 13 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '14.3', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s13power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 13 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2.73', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s13powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 13 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.95', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s13reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 13 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.65', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s13voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 13 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_13_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '231.3', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s14apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 14 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.08', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s14electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 14 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '15.4', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s14power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 14 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2.94', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s14powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 14 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.96', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s14reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 14 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.7', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s14voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 14 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_14_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '231.4', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s15apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 15 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.3', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s15electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 15 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '16.5', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s15power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 15 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.15', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s15powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 15 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.97', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s15reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 15 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.75', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s15voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 15 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_15_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '231.5', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s16apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 16 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.52', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s16electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 16 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '17.6', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s16power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 16 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.36', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s16powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 16 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.98', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s16reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 16 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.8', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s16voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 16 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_16_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '231.6', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s17apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 17 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.74', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s17electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 17 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '18.7', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s17power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 17 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.57', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s17powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 17 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.99', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s17reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 17 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.85', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s17voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 17 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_17_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '231.7', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s18apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 18 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.96', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s18electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 18 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '19.8', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s18power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 18 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.78', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s18powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 18 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.94', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s18reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 18 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.9', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s18voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 18 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_18_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '231.8', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s19apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 19 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.74', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s19electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 19 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '18.7', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s19power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 19 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.57', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s19powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 19 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.99', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s19reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 19 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.85', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s19voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 19 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_19_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '231.7', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s1apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 1 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.22', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s1electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 1 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1.1', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s1power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 1 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.21', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s1powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 1 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.95', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s1reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 1 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.05', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s1voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 1 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '230.1', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s20apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 20 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.96', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s20electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 20 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '19.8', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s20power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 20 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.78', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s20powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 20 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.94', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s20reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 20 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.9', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s20voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 20 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_20_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '231.8', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s2apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 2 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.44', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s2electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 2 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '2.2', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s2power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 2 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.42', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s2powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 2 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.96', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s2reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 2 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.1', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s2voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 2 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_2_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '230.2', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s3apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 3 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.66', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s3electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 3 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '3.3', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s3power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 3 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.63', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s3powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 3 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.97', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s3reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 3 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.15', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s3voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 3 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '230.3', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s4apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 4 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.88', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s4electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 4 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '4.4', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s4power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 4 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.84', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s4powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 4 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.98', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s4reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 4 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.2', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s4voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 4 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '230.4', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s5apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 5 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1.1', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s5electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 5 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '5.5', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s5power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 5 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1.05', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s5powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 5 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.99', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s5reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 5 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.25', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s5voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 5 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '230.5', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s6apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 6 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1.32', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s6electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 6 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '6.6', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s6power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 6 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1.26', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s6powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 6 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.94', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s6reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 6 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.3', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s6voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 6 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '230.6', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s7apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 7 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1.54', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s7electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 7 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '7.7', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s7power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 7 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1.47', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s7powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 7 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.95', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s7reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 7 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.35', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s7voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 7 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '230.7', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s8apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 8 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1.76', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s8electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 8 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '8.8', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s8power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 8 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1.68', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s8powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 8 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.96', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s8reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 8 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.4', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s8voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 8 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '230.8', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s9apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : 'Channel 9 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1.98', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s9electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : 'Channel 9 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '9.9', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s9power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : 'Channel 9 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '1.89', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s9powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : 'Channel 9 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.97', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s9reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : 'Channel 9 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.45', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s9voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : 'Channel 9 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '230.9', + }) +# --- # name: test_platform_setup_and_discovery[sensor.cleverio_pf100_battery-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ @@ -6847,6 +13967,304 @@ 'state': '0.12', }) # --- +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_apparent_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_apparent_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kVA', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Apparent power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.m2gpwqz5xb4chzqubdnzphase_s1apparentpower', + 'unit_of_measurement': 'kVA', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_apparent_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : '多路计量有线demo26082501 Apparent power', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_apparent_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.0', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_current-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_current', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'A', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Current', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.m2gpwqz5xb4chzqubdnzphase_s1electriccurrent', + 'unit_of_measurement': 'A', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_current-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '多路计量有线demo26082501 Current', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_current', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '53.86', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kW', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.m2gpwqz5xb4chzqubdnzphase_s1power', + 'unit_of_measurement': 'kW', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '多路计量有线demo26082501 Power', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '9.548', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_power_factor-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_power_factor', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.m2gpwqz5xb4chzqubdnzphase_s1powerfactor', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_power_factor-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '多路计量有线demo26082501 Power factor', + : , + }), + 'context': , + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_power_factor', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.77', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_reactive_power-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_reactive_power', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 2, + }), + 'sensor.private': dict({ + 'suggested_unit_of_measurement': 'kvar', + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Reactive power', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.m2gpwqz5xb4chzqubdnzphase_s1reactivepower', + 'unit_of_measurement': 'kvar', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_reactive_power-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '多路计量有线demo26082501 Reactive power', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_reactive_power', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '0.0', + }) +# --- # name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_supply_frequency-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ @@ -6905,6 +14323,64 @@ 'state': '0.0', }) # --- +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_voltage-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': dict({ + : , + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'sensor', + 'entity_category': None, + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_voltage', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'tuya.m2gpwqz5xb4chzqubdnzphase_s1voltage', + 'unit_of_measurement': 'V', + }) +# --- +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_voltage-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '多路计量有线demo26082501 Voltage', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_voltage', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': '230.1', + }) +# --- # name: test_platform_setup_and_discovery[sensor.eau_chaude_current-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ diff --git a/tests/components/tuya/test_sensor.py b/tests/components/tuya/test_sensor.py index fd8618eb56b2..0da3ce486394 100644 --- a/tests/components/tuya/test_sensor.py +++ b/tests/components/tuya/test_sensor.py @@ -9,9 +9,10 @@ from syrupy.assertion import SnapshotAssertion from tuya_sharing import CustomerDevice, Manager from homeassistant.components.sensor import SensorStateClass +from homeassistant.components.tuya.const import DOMAIN from homeassistant.const import Platform from homeassistant.core import HomeAssistant -from homeassistant.helpers import entity_registry as er, json +from homeassistant.helpers import device_registry as dr, entity_registry as er, json from homeassistant.util import json as json_util from homeassistant.util.unit_system import ( METRIC_SYSTEM, @@ -46,6 +47,43 @@ async def test_platform_setup_and_discovery( await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id) +@pytest.mark.parametrize( + ("mock_device_code", "expected_children", "expected_parent_phase_entities"), + [ + pytest.param("zndb_qxlwffgv8avf5rrw", 20, 0, id="multi_channel"), + pytest.param("zndb_uqzhc4bx5zqwpg2m", 0, 6, id="single_channel"), + ], +) +async def test_indexed_phase_child_devices( + hass: HomeAssistant, + mock_manager: Manager, + mock_config_entry: MockConfigEntry, + mock_device: CustomerDevice, + device_registry: dr.DeviceRegistry, + entity_registry: er.EntityRegistry, + expected_children: int, + expected_parent_phase_entities: int, +) -> None: + """Test indexed phase sensors only move to child devices for multi-channel meters.""" + await initialize_entry(hass, mock_manager, mock_config_entry, mock_device) + + parent = device_registry.async_get_device_by_identifier( + (DOMAIN, mock_device.id), mock_config_entry.entry_id + ) + assert parent is not None + assert ( + len(dr.async_entries_for_parent_device(device_registry, parent.id)) + == expected_children + ) + assert ( + sum( + "phase_s" in entry.unique_id + for entry in er.async_entries_for_device(entity_registry, parent.id) + ) + == expected_parent_phase_entities + ) + + @pytest.mark.parametrize( "mock_device_code", ["mcs_8yhypbo7"],