diff --git a/homeassistant/components/tuya/entity.py b/homeassistant/components/tuya/entity.py index 953d1ad0666e..b1a092aae313 100644 --- a/homeassistant/components/tuya/entity.py +++ b/homeassistant/components/tuya/entity.py @@ -1,13 +1,12 @@ """Tuya Home Assistant Base Device Model.""" -from collections.abc import Callable from dataclasses import dataclass from typing import Any, override from tuya_device_handlers.device_wrapper import DeviceWrapper from tuya_sharing import CustomerDevice, Manager -from homeassistant.helpers.device_registry import ChildDeviceInfo, DeviceInfo +from homeassistant.helpers.device_registry import DeviceInfo from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.entity import Entity, EntityDescription @@ -18,31 +17,6 @@ from .const import DOMAIN, LOGGER, TUYA_HA_SIGNAL_UPDATE_ENTITY class TuyaEntityDescription(EntityDescription): """Describes a Tuya entity.""" - channel_index: int | None = None - channel_condition: Callable[[CustomerDevice], bool] | None = None - - -def get_child_device_info( - device: CustomerDevice, - parent_device_id: str, - description: TuyaEntityDescription, -) -> ChildDeviceInfo | None: - """Get the device info for a single channel of a Tuya device. - - Returns None for entities belonging to the device itself, and for devices - that do not expose more than one channel. - """ - if (channel_index := description.channel_index) is None: - return None - if description.channel_condition and not description.channel_condition(device): - return None - return ChildDeviceInfo( - identifiers={(DOMAIN, f"{device.id}_channel_{channel_index}")}, - parent_device_id=parent_device_id, - translation_key="channel", - translation_placeholders={"index": str(channel_index)}, - ) - class TuyaEntity(Entity): """Tuya base device.""" @@ -55,13 +29,9 @@ class TuyaEntity(Entity): device: CustomerDevice, device_manager: Manager, description: TuyaEntityDescription, - *, - device_info: ChildDeviceInfo | None = None, ) -> None: """Init TuyaEntity.""" - self._attr_device_info = device_info or DeviceInfo( - identifiers={(DOMAIN, device.id)} - ) + self._attr_device_info = DeviceInfo(identifiers={(DOMAIN, device.id)}) # Legacy format, kept as migrating existing unique IDs is not worth the risk self._attr_unique_id = f"tuya.{device.id}{description.key}" # pylint: disable=home-assistant-entity-unique-id-redundant-domain self.entity_description = description diff --git a/homeassistant/components/tuya/number.py b/homeassistant/components/tuya/number.py index d4a87fc7a508..12037c774159 100644 --- a/homeassistant/components/tuya/number.py +++ b/homeassistant/components/tuya/number.py @@ -17,21 +17,18 @@ from homeassistant.components.number import ( ) from homeassistant.const import EntityCategory, UnitOfRatio, 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 .const import ( DEVICE_CLASS_UNITS, - DOMAIN, LOGGER, TUYA_DISCOVERY_NEW, DeviceCategory, DPCode, ) from .coordinator import TuyaConfigEntry -from .entity import TuyaEntity, TuyaEntityDescription, get_child_device_info +from .entity import TuyaEntity, TuyaEntityDescription from .util import get_device_temp_unit_convert @@ -275,13 +272,10 @@ NUMBERS: dict[DeviceCategory, tuple[TuyaNumberEntityDescription, ...]] = { *( TuyaNumberEntityDescription( key=DPCode(f"countdown_{channel}"), - translation_key="irrigation_duration", + translation_key="indexed_irrigation_duration", + translation_placeholders={"index": str(channel)}, device_class=NumberDeviceClass.DURATION, entity_category=EntityCategory.CONFIG, - channel_index=channel, - channel_condition=lambda device: ( - DPCode.COUNTDOWN_2 in device.status_range - ), ) for channel in range(1, 9) ), @@ -499,19 +493,8 @@ async def async_setup_entry( for device_id in device_ids: device = manager.device_map[device_id] if descriptions := NUMBERS.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( - TuyaNumberEntity( - device, - manager, - description, - definition, - device_info=get_child_device_info( - device, parent_device_id, description - ), - ) + TuyaNumberEntity(device, manager, description, definition) for description in descriptions if (definition := get_default_definition(device, description.key)) ) @@ -534,11 +517,9 @@ class TuyaNumberEntity(TuyaEntity, NumberEntity): device_manager: Manager, description: TuyaNumberEntityDescription, definition: NumberDefinition, - *, - device_info: ChildDeviceInfo | None = None, ) -> None: """Initialize a Tuya number entity.""" - super().__init__(device, device_manager, description, device_info=device_info) + super().__init__(device, device_manager, description) self._dpcode_wrapper = definition.number_wrapper self._attr_native_max_value = definition.number_wrapper.max_value diff --git a/homeassistant/components/tuya/sensor.py b/homeassistant/components/tuya/sensor.py index 3b5f5dd90c7c..3f28246797bc 100644 --- a/homeassistant/components/tuya/sensor.py +++ b/homeassistant/components/tuya/sensor.py @@ -53,22 +53,19 @@ 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, get_child_device_info +from .entity import TuyaEntity, TuyaEntityDescription from .util import get_device_temp_unit_convert @@ -146,11 +143,6 @@ 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, ...]: @@ -159,56 +151,56 @@ def _indexed_electricity_data( TuyaSensorEntityDescription( key=f"{dpcode}electriccurrent", dpcode=dpcode, + translation_key="indexed_current", + translation_placeholders={"index": str(index)}, 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, + translation_key="indexed_power", + translation_placeholders={"index": str(index)}, 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, + translation_key="indexed_voltage", + translation_placeholders={"index": str(index)}, 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, + translation_key="indexed_reactive_power", + translation_placeholders={"index": str(index)}, 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, + translation_key="indexed_apparent_power", + translation_placeholders={"index": str(index)}, 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, + translation_key="indexed_power_factor", + translation_placeholders={"index": str(index)}, device_class=SensorDeviceClass.POWER_FACTOR, state_class=SensorStateClass.MEASUREMENT, wrapper_class=(ElectricityPowerFactorHexStringWrapper,), - channel_index=index, - channel_condition=_has_multiple_phase_channels, ), ) @@ -1919,21 +1911,8 @@ 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, - device_info=get_child_device_info( - device, parent_device_id, description - ), - ) + TuyaSensorEntity(device, manager, description, definition) for description in descriptions if ( definition := get_default_definition( @@ -1964,11 +1943,9 @@ 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, device_info=device_info) + super().__init__(device, device_manager, description) self._dpcode_wrapper = definition.sensor_wrapper if description.suggested_unit_of_measurement is None: diff --git a/homeassistant/components/tuya/strings.json b/homeassistant/components/tuya/strings.json index 14f5b8b460f1..5dc61aa1c3d2 100644 --- a/homeassistant/components/tuya/strings.json +++ b/homeassistant/components/tuya/strings.json @@ -29,11 +29,6 @@ } } }, - "device": { - "channel": { - "name": "Channel {index}" - } - }, "entity": { "binary_sensor": { "bag_full": { @@ -229,6 +224,9 @@ "indexed_cook_temperature": { "name": "Cooking temperature {index}" }, + "indexed_irrigation_duration": { + "name": "Irrigation duration {index}" + }, "indexed_maximum_brightness": { "name": "Maximum brightness {index}" }, @@ -796,6 +794,9 @@ "illuminance": { "name": "[%key:component::sensor::entity_component::illuminance::name%]" }, + "indexed_apparent_power": { + "name": "Apparent power channel {index}" + }, "indexed_current": { "name": "Current channel {index}" }, @@ -818,6 +819,12 @@ "indexed_power": { "name": "Power channel {index}" }, + "indexed_power_factor": { + "name": "Power factor channel {index}" + }, + "indexed_reactive_power": { + "name": "Reactive power channel {index}" + }, "indexed_temperature_external": { "name": "Probe temperature channel {index}" }, @@ -1279,6 +1286,9 @@ } }, "valve": { + "indexed_valve": { + "name": "Valve {index}" + }, "valve": { "name": "Valve" } diff --git a/homeassistant/components/tuya/valve.py b/homeassistant/components/tuya/valve.py index 99026187873c..db811d5f780d 100644 --- a/homeassistant/components/tuya/valve.py +++ b/homeassistant/components/tuya/valve.py @@ -16,14 +16,12 @@ from homeassistant.components.valve import ( ValveEntityFeature, ) 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 .const import DOMAIN, TUYA_DISCOVERY_NEW, DeviceCategory, DPCode +from .const import TUYA_DISCOVERY_NEW, DeviceCategory, DPCode from .coordinator import TuyaConfigEntry -from .entity import TuyaEntity, TuyaEntityDescription, get_child_device_info +from .entity import TuyaEntity, TuyaEntityDescription @dataclass(frozen=True) @@ -41,10 +39,9 @@ VALVES: dict[DeviceCategory, tuple[TuyaValveEntityDescription, ...]] = { *( TuyaValveEntityDescription( key=DPCode(f"switch_{channel}"), - translation_key="valve", + translation_key="indexed_valve", + translation_placeholders={"index": str(channel)}, device_class=ValveDeviceClass.WATER, - channel_index=channel, - channel_condition=lambda device: DPCode.SWITCH_2 in device.status_range, ) for channel in range(1, 9) ), @@ -67,19 +64,8 @@ async def async_setup_entry( for device_id in device_ids: device = manager.device_map[device_id] if descriptions := VALVES.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( - TuyaValveEntity( - device, - manager, - description, - definition, - device_info=get_child_device_info( - device, parent_device_id, description - ), - ) + TuyaValveEntity(device, manager, description, definition) for description in descriptions if (definition := get_default_definition(device, description.key)) ) @@ -104,11 +90,9 @@ class TuyaValveEntity(TuyaEntity, ValveEntity): device_manager: Manager, description: TuyaValveEntityDescription, definition: ValveDefinition, - *, - device_info: ChildDeviceInfo | None = None, ) -> None: """Init TuyaValveEntity.""" - super().__init__(device, device_manager, description, device_info=device_info) + super().__init__(device, device_manager, description) self._dpcode_wrapper = definition.control_wrapper @property diff --git a/tests/components/tuya/snapshots/test_init.ambr b/tests/components/tuya/snapshots/test_init.ambr index 26489ad33a93..b987149b1075 100644 --- a/tests/components/tuya/snapshots/test_init.ambr +++ b/tests/components/tuya/snapshots/test_init.ambr @@ -2819,166 +2819,6 @@ 'via_device_id': None, }) # --- -# name: test_device_registry[cijerqyssiwrf7deqzkfs_channel_1] - DeviceRegistryEntrySnapshot({ - 'area_id': None, - 'config_entry_id': , - 'config_subentry_id': , - 'disabled_by': None, - 'id': , - 'identifiers': set({ - tuple( - 'tuya', - 'cijerqyssiwrf7deqzkfs_channel_1', - ), - }), - 'labels': set({ - }), - 'name': 'Channel 1', - 'name_by_user': None, - 'parent_device_id': , - }) -# --- -# name: test_device_registry[cijerqyssiwrf7deqzkfs_channel_2] - DeviceRegistryEntrySnapshot({ - 'area_id': None, - 'config_entry_id': , - 'config_subentry_id': , - 'disabled_by': None, - 'id': , - 'identifiers': set({ - tuple( - 'tuya', - 'cijerqyssiwrf7deqzkfs_channel_2', - ), - }), - 'labels': set({ - }), - 'name': 'Channel 2', - 'name_by_user': None, - 'parent_device_id': , - }) -# --- -# name: test_device_registry[cijerqyssiwrf7deqzkfs_channel_3] - DeviceRegistryEntrySnapshot({ - 'area_id': None, - 'config_entry_id': , - 'config_subentry_id': , - 'disabled_by': None, - 'id': , - 'identifiers': set({ - tuple( - 'tuya', - 'cijerqyssiwrf7deqzkfs_channel_3', - ), - }), - 'labels': set({ - }), - 'name': 'Channel 3', - 'name_by_user': None, - 'parent_device_id': , - }) -# --- -# name: test_device_registry[cijerqyssiwrf7deqzkfs_channel_4] - DeviceRegistryEntrySnapshot({ - 'area_id': None, - 'config_entry_id': , - 'config_subentry_id': , - 'disabled_by': None, - 'id': , - 'identifiers': set({ - tuple( - 'tuya', - 'cijerqyssiwrf7deqzkfs_channel_4', - ), - }), - 'labels': set({ - }), - 'name': 'Channel 4', - 'name_by_user': None, - 'parent_device_id': , - }) -# --- -# name: test_device_registry[cijerqyssiwrf7deqzkfs_channel_5] - DeviceRegistryEntrySnapshot({ - 'area_id': None, - 'config_entry_id': , - 'config_subentry_id': , - 'disabled_by': None, - 'id': , - 'identifiers': set({ - tuple( - 'tuya', - 'cijerqyssiwrf7deqzkfs_channel_5', - ), - }), - 'labels': set({ - }), - 'name': 'Channel 5', - 'name_by_user': None, - 'parent_device_id': , - }) -# --- -# name: test_device_registry[cijerqyssiwrf7deqzkfs_channel_6] - DeviceRegistryEntrySnapshot({ - 'area_id': None, - 'config_entry_id': , - 'config_subentry_id': , - 'disabled_by': None, - 'id': , - 'identifiers': set({ - tuple( - 'tuya', - 'cijerqyssiwrf7deqzkfs_channel_6', - ), - }), - 'labels': set({ - }), - 'name': 'Channel 6', - 'name_by_user': None, - 'parent_device_id': , - }) -# --- -# name: test_device_registry[cijerqyssiwrf7deqzkfs_channel_7] - DeviceRegistryEntrySnapshot({ - 'area_id': None, - 'config_entry_id': , - 'config_subentry_id': , - 'disabled_by': None, - 'id': , - 'identifiers': set({ - tuple( - 'tuya', - 'cijerqyssiwrf7deqzkfs_channel_7', - ), - }), - 'labels': set({ - }), - 'name': 'Channel 7', - 'name_by_user': None, - 'parent_device_id': , - }) -# --- -# name: test_device_registry[cijerqyssiwrf7deqzkfs_channel_8] - DeviceRegistryEntrySnapshot({ - 'area_id': None, - 'config_entry_id': , - 'config_subentry_id': , - 'disabled_by': None, - 'id': , - 'identifiers': set({ - tuple( - 'tuya', - 'cijerqyssiwrf7deqzkfs_channel_8', - ), - }), - 'labels': set({ - }), - 'name': 'Channel 8', - 'name_by_user': None, - 'parent_device_id': , - }) -# --- # name: test_device_registry[cju47ovcbeuapei2zc] DeviceRegistryEntrySnapshot({ 'area_id': None, @@ -9009,406 +8849,6 @@ '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_number.ambr b/tests/components/tuya/snapshots/test_number.ambr index 45009ea4a63f..f3294c5282a8 100644 --- a/tests/components/tuya/snapshots/test_number.ambr +++ b/tests/components/tuya/snapshots/test_number.ambr @@ -1573,7 +1573,7 @@ 'state': '28.0', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_1_irrigation_duration-entry] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -1592,7 +1592,7 @@ 'disabled_by': None, 'domain': 'number', 'entity_category': , - 'entity_id': 'number.jie_hashui_fa_channel_1_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1600,26 +1600,26 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Irrigation duration', + 'object_id_base': 'Irrigation duration 1', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Irrigation duration', + 'original_name': 'Irrigation duration 1', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'irrigation_duration', + 'translation_key': 'indexed_irrigation_duration', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfscountdown_1', 'unit_of_measurement': 'min', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_1_irrigation_duration-state] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'duration', - : 'Channel 1 Irrigation duration', + : '接HA水阀 Irrigation duration 1', : 1439.0, : 1.0, : , @@ -1627,14 +1627,14 @@ : 'min', }), 'context': , - 'entity_id': 'number.jie_hashui_fa_channel_1_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_1', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '1.0', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_2_irrigation_duration-entry] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_2-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -1653,7 +1653,7 @@ 'disabled_by': None, 'domain': 'number', 'entity_category': , - 'entity_id': 'number.jie_hashui_fa_channel_2_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_2', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1661,26 +1661,26 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Irrigation duration', + 'object_id_base': 'Irrigation duration 2', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Irrigation duration', + 'original_name': 'Irrigation duration 2', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'irrigation_duration', + 'translation_key': 'indexed_irrigation_duration', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfscountdown_2', 'unit_of_measurement': 'min', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_2_irrigation_duration-state] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_2-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'duration', - : 'Channel 2 Irrigation duration', + : '接HA水阀 Irrigation duration 2', : 1439.0, : 1.0, : , @@ -1688,14 +1688,14 @@ : 'min', }), 'context': , - 'entity_id': 'number.jie_hashui_fa_channel_2_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_2', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '1.0', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_3_irrigation_duration-entry] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_3-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -1714,7 +1714,7 @@ 'disabled_by': None, 'domain': 'number', 'entity_category': , - 'entity_id': 'number.jie_hashui_fa_channel_3_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_3', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1722,26 +1722,26 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Irrigation duration', + 'object_id_base': 'Irrigation duration 3', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Irrigation duration', + 'original_name': 'Irrigation duration 3', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'irrigation_duration', + 'translation_key': 'indexed_irrigation_duration', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfscountdown_3', 'unit_of_measurement': 'min', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_3_irrigation_duration-state] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_3-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'duration', - : 'Channel 3 Irrigation duration', + : '接HA水阀 Irrigation duration 3', : 1439.0, : 1.0, : , @@ -1749,14 +1749,14 @@ : 'min', }), 'context': , - 'entity_id': 'number.jie_hashui_fa_channel_3_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_3', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '3.0', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_4_irrigation_duration-entry] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_4-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -1775,7 +1775,7 @@ 'disabled_by': None, 'domain': 'number', 'entity_category': , - 'entity_id': 'number.jie_hashui_fa_channel_4_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_4', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1783,26 +1783,26 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Irrigation duration', + 'object_id_base': 'Irrigation duration 4', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Irrigation duration', + 'original_name': 'Irrigation duration 4', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'irrigation_duration', + 'translation_key': 'indexed_irrigation_duration', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfscountdown_4', 'unit_of_measurement': 'min', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_4_irrigation_duration-state] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_4-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'duration', - : 'Channel 4 Irrigation duration', + : '接HA水阀 Irrigation duration 4', : 1439.0, : 1.0, : , @@ -1810,14 +1810,14 @@ : 'min', }), 'context': , - 'entity_id': 'number.jie_hashui_fa_channel_4_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_4', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '2.0', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_5_irrigation_duration-entry] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_5-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -1836,7 +1836,7 @@ 'disabled_by': None, 'domain': 'number', 'entity_category': , - 'entity_id': 'number.jie_hashui_fa_channel_5_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_5', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1844,26 +1844,26 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Irrigation duration', + 'object_id_base': 'Irrigation duration 5', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Irrigation duration', + 'original_name': 'Irrigation duration 5', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'irrigation_duration', + 'translation_key': 'indexed_irrigation_duration', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfscountdown_5', 'unit_of_measurement': 'min', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_5_irrigation_duration-state] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_5-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'duration', - : 'Channel 5 Irrigation duration', + : '接HA水阀 Irrigation duration 5', : 1439.0, : 1.0, : , @@ -1871,14 +1871,14 @@ : 'min', }), 'context': , - 'entity_id': 'number.jie_hashui_fa_channel_5_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_5', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '2.0', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_6_irrigation_duration-entry] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_6-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -1897,7 +1897,7 @@ 'disabled_by': None, 'domain': 'number', 'entity_category': , - 'entity_id': 'number.jie_hashui_fa_channel_6_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_6', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1905,26 +1905,26 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Irrigation duration', + 'object_id_base': 'Irrigation duration 6', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Irrigation duration', + 'original_name': 'Irrigation duration 6', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'irrigation_duration', + 'translation_key': 'indexed_irrigation_duration', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfscountdown_6', 'unit_of_measurement': 'min', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_6_irrigation_duration-state] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_6-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'duration', - : 'Channel 6 Irrigation duration', + : '接HA水阀 Irrigation duration 6', : 1439.0, : 1.0, : , @@ -1932,14 +1932,14 @@ : 'min', }), 'context': , - 'entity_id': 'number.jie_hashui_fa_channel_6_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_6', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '3.0', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_7_irrigation_duration-entry] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_7-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -1958,7 +1958,7 @@ 'disabled_by': None, 'domain': 'number', 'entity_category': , - 'entity_id': 'number.jie_hashui_fa_channel_7_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_7', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -1966,26 +1966,26 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Irrigation duration', + 'object_id_base': 'Irrigation duration 7', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Irrigation duration', + 'original_name': 'Irrigation duration 7', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'irrigation_duration', + 'translation_key': 'indexed_irrigation_duration', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfscountdown_7', 'unit_of_measurement': 'min', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_7_irrigation_duration-state] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_7-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'duration', - : 'Channel 7 Irrigation duration', + : '接HA水阀 Irrigation duration 7', : 1439.0, : 1.0, : , @@ -1993,14 +1993,14 @@ : 'min', }), 'context': , - 'entity_id': 'number.jie_hashui_fa_channel_7_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_7', 'last_changed': , 'last_reported': , 'last_updated': , 'state': '1.0', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_8_irrigation_duration-entry] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_8-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -2019,7 +2019,7 @@ 'disabled_by': None, 'domain': 'number', 'entity_category': , - 'entity_id': 'number.jie_hashui_fa_channel_8_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_8', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -2027,26 +2027,26 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Irrigation duration', + 'object_id_base': 'Irrigation duration 8', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Irrigation duration', + 'original_name': 'Irrigation duration 8', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': 'irrigation_duration', + 'translation_key': 'indexed_irrigation_duration', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfscountdown_8', 'unit_of_measurement': 'min', }) # --- -# name: test_platform_setup_and_discovery[number.jie_hashui_fa_channel_8_irrigation_duration-state] +# name: test_platform_setup_and_discovery[number.jie_hashui_fa_irrigation_duration_8-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'duration', - : 'Channel 8 Irrigation duration', + : '接HA水阀 Irrigation duration 8', : 1439.0, : 1.0, : , @@ -2054,7 +2054,7 @@ : 'min', }), 'context': , - 'entity_id': 'number.jie_hashui_fa_channel_8_irrigation_duration', + 'entity_id': 'number.jie_hashui_fa_irrigation_duration_8', 'last_changed': , 'last_reported': , 'last_updated': , diff --git a/tests/components/tuya/snapshots/test_sensor.ambr b/tests/components/tuya/snapshots/test_sensor.ambr index 7d9931e58a4d..433ec7572890 100644 --- a/tests/components/tuya/snapshots/test_sensor.ambr +++ b/tests/components/tuya/snapshots/test_sensor.ambr @@ -5047,7 +5047,7 @@ '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -5063,7 +5063,7 @@ '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -5071,7 +5071,7 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Apparent power', + 'object_id_base': 'Apparent power channel 1', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -5082,3593 +5082,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Apparent power', + 'original_name': 'Apparent power channel 1', '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, + 'translation_key': 'indexed_apparent_power', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'apparent_power', - : 'Channel 1 Apparent power', + : '测试无回路-多路计量cat.1 Apparent power channel 1', : , : 'kVA', }), 'context': , - 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_1_apparent_power', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_1', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_10-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -8684,7 +5124,7 @@ '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_10', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -8692,302 +5132,7 @@ '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', + 'object_id_base': 'Apparent power channel 10', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -8998,450 +5143,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Apparent power', + 'original_name': 'Apparent power channel 10', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s20apparentpower', + 'translation_key': 'indexed_apparent_power', + '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_20_apparent_power-state] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_10-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'apparent_power', - : 'Channel 20 Apparent power', + : '测试无回路-多路计量cat.1 Apparent power channel 10', : , : '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_10', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_11-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -9457,7 +5185,7 @@ '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_11', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9465,241 +5193,7 @@ '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', + 'object_id_base': 'Apparent power channel 11', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -9710,33 +5204,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Apparent power', + 'original_name': 'Apparent power channel 11', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s3apparentpower', + 'translation_key': 'indexed_apparent_power', + '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_3_apparent_power-state] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_11-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'apparent_power', - : 'Channel 3 Apparent power', + : '测试无回路-多路计量cat.1 Apparent power channel 11', : , : 'kVA', }), 'context': , - 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_apparent_power', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_11', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.66', + 'state': '2.42', }) # --- -# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_current-entry] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_12-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -9752,7 +5246,7 @@ '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_12', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9760,44 +5254,227 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current', + 'object_id_base': 'Apparent power channel 12', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, }), 'sensor.private': dict({ - 'suggested_unit_of_measurement': 'A', + 'suggested_unit_of_measurement': 'kVA', }), }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, - 'original_name': 'Current', + 'original_name': 'Apparent power channel 12', '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', + 'translation_key': 'indexed_apparent_power', + '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_3_current-state] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_12-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - : 'current', - : 'Channel 3 Current', + : 'apparent_power', + : '测试无回路-多路计量cat.1 Apparent power channel 12', : , - : 'A', + : 'kVA', }), 'context': , - 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_3_current', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_12', + '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_apparent_power_channel_13-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_apparent_power_channel_13', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power channel 13', + '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 channel 13', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_apparent_power', + '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_apparent_power_channel_13-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : '测试无回路-多路计量cat.1 Apparent power channel 13', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_13', + '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_apparent_power_channel_14-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_apparent_power_channel_14', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power channel 14', + '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 channel 14', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_apparent_power', + '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_apparent_power_channel_14-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : '测试无回路-多路计量cat.1 Apparent power channel 14', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_14', + '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_apparent_power_channel_15-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_apparent_power_channel_15', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power channel 15', + '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 channel 15', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_apparent_power', + '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_apparent_power_channel_15-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : '测试无回路-多路计量cat.1 Apparent power channel 15', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_15', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_16-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -9813,7 +5490,7 @@ '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_16', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -9821,241 +5498,7 @@ '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', + 'object_id_base': 'Apparent power channel 16', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -10066,33 +5509,460 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Apparent power', + 'original_name': 'Apparent power channel 16', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s4apparentpower', + 'translation_key': 'indexed_apparent_power', + '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_4_apparent_power-state] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_16-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'apparent_power', - : 'Channel 4 Apparent power', + : '测试无回路-多路计量cat.1 Apparent power channel 16', : , : 'kVA', }), 'context': , - 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_4_apparent_power', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_16', + '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_apparent_power_channel_17-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_apparent_power_channel_17', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power channel 17', + '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 channel 17', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_apparent_power', + '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_apparent_power_channel_17-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : '测试无回路-多路计量cat.1 Apparent power channel 17', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_17', + '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_apparent_power_channel_18-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_apparent_power_channel_18', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power channel 18', + '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 channel 18', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_apparent_power', + '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_apparent_power_channel_18-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : '测试无回路-多路计量cat.1 Apparent power channel 18', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_18', + '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_apparent_power_channel_19-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_apparent_power_channel_19', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power channel 19', + '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 channel 19', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_apparent_power', + '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_apparent_power_channel_19-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : '测试无回路-多路计量cat.1 Apparent power channel 19', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_19', + '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_apparent_power_channel_2-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_apparent_power_channel_2', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power channel 2', + '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 channel 2', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_apparent_power', + '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_apparent_power_channel_2-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : '测试无回路-多路计量cat.1 Apparent power channel 2', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_2', + '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_apparent_power_channel_20-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_apparent_power_channel_20', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power channel 20', + '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 channel 20', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_apparent_power', + '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_apparent_power_channel_20-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : '测试无回路-多路计量cat.1 Apparent power channel 20', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_20', + '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_apparent_power_channel_3-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_apparent_power_channel_3', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power channel 3', + '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 channel 3', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_apparent_power', + '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_apparent_power_channel_3-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : '测试无回路-多路计量cat.1 Apparent power channel 3', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_3', + '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_apparent_power_channel_4-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_apparent_power_channel_4', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Apparent power channel 4', + '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 channel 4', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_apparent_power', + '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_apparent_power_channel_4-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'apparent_power', + : '测试无回路-多路计量cat.1 Apparent power channel 4', + : , + : 'kVA', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_4', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_5-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -10108,7 +5978,7 @@ '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_5', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10116,302 +5986,7 @@ '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', + 'object_id_base': 'Apparent power channel 5', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -10422,33 +5997,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Apparent power', + 'original_name': 'Apparent power channel 5', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, + 'translation_key': 'indexed_apparent_power', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_5-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'apparent_power', - : 'Channel 5 Apparent power', + : '测试无回路-多路计量cat.1 Apparent power channel 5', : , : 'kVA', }), 'context': , - 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_5_apparent_power', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_5', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_6-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -10464,7 +6039,7 @@ '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_6', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10472,302 +6047,7 @@ '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', + 'object_id_base': 'Apparent power channel 6', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -10778,33 +6058,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Apparent power', + 'original_name': 'Apparent power channel 6', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, + 'translation_key': 'indexed_apparent_power', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_6-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'apparent_power', - : 'Channel 6 Apparent power', + : '测试无回路-多路计量cat.1 Apparent power channel 6', : , : 'kVA', }), 'context': , - 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_6_apparent_power', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_6', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_7-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -10820,7 +6100,7 @@ '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_7', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -10828,302 +6108,7 @@ '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', + 'object_id_base': 'Apparent power channel 7', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -11134,33 +6119,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Apparent power', + 'original_name': 'Apparent power channel 7', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, + 'translation_key': 'indexed_apparent_power', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_7-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'apparent_power', - : 'Channel 7 Apparent power', + : '测试无回路-多路计量cat.1 Apparent power channel 7', : , : 'kVA', }), 'context': , - 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_7_apparent_power', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_7', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_8-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11176,7 +6161,7 @@ '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_8', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11184,302 +6169,7 @@ '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', + 'object_id_base': 'Apparent power channel 8', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -11490,33 +6180,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Apparent power', + 'original_name': 'Apparent power channel 8', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, + 'translation_key': 'indexed_apparent_power', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_8-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'apparent_power', - : 'Channel 8 Apparent power', + : '测试无回路-多路计量cat.1 Apparent power channel 8', : , : 'kVA', }), 'context': , - 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_8_apparent_power', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_8', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_9-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11532,7 +6222,7 @@ '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_9', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11540,302 +6230,7 @@ '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', + 'object_id_base': 'Apparent power channel 9', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -11846,33 +6241,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Apparent power', + 'original_name': 'Apparent power channel 9', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, + 'translation_key': 'indexed_apparent_power', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_9-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'apparent_power', - : 'Channel 9 Apparent power', + : '测试无回路-多路计量cat.1 Apparent power channel 9', : , : 'kVA', }), 'context': , - 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_apparent_power', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_apparent_power_channel_9', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11888,7 +6283,7 @@ '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11896,7 +6291,7 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current', + 'object_id_base': 'Current channel 1', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -11907,33 +6302,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Current', + 'original_name': 'Current channel 1', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s9electriccurrent', + 'translation_key': 'indexed_current', + '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_9_current-state] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'current', - : 'Channel 9 Current', + : '测试无回路-多路计量cat.1 Current channel 1', : , : 'A', }), 'context': , - 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_current', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_1', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '9.9', + 'state': '1.1', }) # --- -# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_power-entry] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_10-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -11949,7 +6344,7 @@ '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_10', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -11957,7 +6352,1166 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Power', + 'object_id_base': 'Current channel 10', + '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 channel 10', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_10-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 10', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_10', + '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_current_channel_11-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_current_channel_11', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 11', + '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 channel 11', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_11-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 11', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_11', + '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_current_channel_12-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_current_channel_12', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 12', + '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 channel 12', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_12-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 12', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_12', + '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_current_channel_13-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_current_channel_13', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 13', + '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 channel 13', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_13-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 13', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_13', + '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_current_channel_14-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_current_channel_14', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 14', + '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 channel 14', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_14-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 14', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_14', + '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_current_channel_15-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_current_channel_15', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 15', + '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 channel 15', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_15-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 15', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_15', + '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_current_channel_16-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_current_channel_16', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 16', + '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 channel 16', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_16-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 16', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_16', + '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_current_channel_17-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_current_channel_17', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 17', + '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 channel 17', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_17-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 17', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_17', + '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_current_channel_18-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_current_channel_18', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 18', + '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 channel 18', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_18-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 18', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_18', + '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_current_channel_19-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_current_channel_19', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 19', + '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 channel 19', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_19-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 19', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_19', + '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_current_channel_2-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_current_channel_2', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 2', + '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 channel 2', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_2-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 2', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_2', + '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_current_channel_20-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_current_channel_20', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 20', + '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 channel 20', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_20-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 20', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_20', + '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_current_channel_3-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_current_channel_3', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 3', + '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 channel 3', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_3-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 3', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_3', + '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_current_channel_4-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_current_channel_4', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 4', + '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 channel 4', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_4-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 4', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_4', + '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_current_channel_5-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_current_channel_5', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 5', + '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 channel 5', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_5-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 5', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_5', + '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_current_channel_6-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_current_channel_6', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 6', + '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 channel 6', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_6-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 6', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_6', + '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_current_channel_7-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_current_channel_7', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 7', + '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 channel 7', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_7-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 7', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_7', + '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_current_channel_8-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_current_channel_8', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 8', + '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 channel 8', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_8-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 8', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_8', + '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_current_channel_9-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_current_channel_9', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Current channel 9', + '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 channel 9', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_current', + '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_current_channel_9-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'current', + : '测试无回路-多路计量cat.1 Current channel 9', + : , + : 'A', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_current_channel_9', + '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_power_channel_1-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_power_channel_1', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 1', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -11968,33 +7522,1192 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Power', + 'original_name': 'Power channel 1', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s9power', + 'translation_key': 'indexed_power', + '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_9_power-state] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'power', - : 'Channel 9 Power', + : '测试无回路-多路计量cat.1 Power channel 1', : , : 'kW', }), 'context': , - 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_power', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_1', + '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_power_channel_10-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_power_channel_10', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 10', + '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 channel 10', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_10-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 10', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_10', + '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_power_channel_11-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_power_channel_11', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 11', + '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 channel 11', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_11-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 11', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_11', + '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_power_channel_12-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_power_channel_12', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 12', + '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 channel 12', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_12-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 12', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_12', + '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_power_channel_13-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_power_channel_13', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 13', + '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 channel 13', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_13-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 13', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_13', + '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_power_channel_14-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_power_channel_14', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 14', + '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 channel 14', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_14-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 14', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_14', + '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_power_channel_15-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_power_channel_15', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 15', + '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 channel 15', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_15-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 15', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_15', + '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_power_channel_16-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_power_channel_16', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 16', + '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 channel 16', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_16-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 16', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_16', + '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_power_channel_17-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_power_channel_17', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 17', + '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 channel 17', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_17-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 17', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_17', + '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_power_channel_18-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_power_channel_18', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 18', + '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 channel 18', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_18-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 18', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_18', + '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_power_channel_19-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_power_channel_19', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 19', + '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 channel 19', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_19-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 19', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_19', + '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_power_channel_2-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_power_channel_2', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 2', + '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 channel 2', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_2-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 2', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_2', + '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_power_channel_20-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_power_channel_20', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 20', + '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 channel 20', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_20-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 20', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_20', + '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_power_channel_3-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_power_channel_3', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 3', + '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 channel 3', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_3-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 3', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_3', + '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_power_channel_4-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_power_channel_4', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 4', + '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 channel 4', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_4-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 4', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_4', + '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_power_channel_5-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_power_channel_5', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 5', + '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 channel 5', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_5-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 5', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_5', + '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_power_channel_6-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_power_channel_6', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 6', + '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 channel 6', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_6-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 6', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_6', + '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_power_channel_7-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_power_channel_7', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 7', + '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 channel 7', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_7-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 7', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_7', + '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_power_channel_8-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_power_channel_8', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 8', + '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 channel 8', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_8-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 8', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_8', + '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_power_channel_9-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_power_channel_9', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power channel 9', + '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 channel 9', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power', + '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_power_channel_9-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power', + : '测试无回路-多路计量cat.1 Power channel 9', + : , + : 'kW', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_channel_9', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -12010,7 +8723,7 @@ '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12018,37 +8731,361 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Power factor', + 'object_id_base': 'Power factor channel 1', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Power factor', + 'original_name': 'Power factor channel 1', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s9powerfactor', + 'translation_key': 'indexed_power_factor', + '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_9_power_factor-state] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'power_factor', - : 'Channel 9 Power factor', + : '测试无回路-多路计量cat.1 Power factor channel 1', : , }), 'context': , - 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_power_factor', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_1', + '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_power_factor_channel_10-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_power_factor_channel_10', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 10', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 10', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_10-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 10', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_10', + '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_power_factor_channel_11-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_power_factor_channel_11', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 11', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 11', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_11-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 11', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_11', + '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_power_factor_channel_12-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_power_factor_channel_12', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 12', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 12', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_12-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 12', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_12', + '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_power_factor_channel_13-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_power_factor_channel_13', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 13', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 13', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_13-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 13', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_13', + '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_power_factor_channel_14-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_power_factor_channel_14', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 14', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 14', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_14-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 14', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_14', + '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_power_factor_channel_15-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_power_factor_channel_15', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 15', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 15', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_15-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 15', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_15', '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] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_16-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -12064,7 +9101,7 @@ '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_16', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12072,7 +9109,709 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reactive power', + 'object_id_base': 'Power factor channel 16', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 16', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_16-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 16', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_16', + '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_power_factor_channel_17-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_power_factor_channel_17', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 17', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 17', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_17-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 17', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_17', + '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_power_factor_channel_18-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_power_factor_channel_18', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 18', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 18', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_18-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 18', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_18', + '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_power_factor_channel_19-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_power_factor_channel_19', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 19', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 19', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_19-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 19', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_19', + '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_power_factor_channel_2-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_power_factor_channel_2', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 2', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 2', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_2-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 2', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_2', + '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_power_factor_channel_20-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_power_factor_channel_20', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 20', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 20', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_20-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 20', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_20', + '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_power_factor_channel_3-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_power_factor_channel_3', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 3', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 3', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_3-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 3', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_3', + '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_power_factor_channel_4-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_power_factor_channel_4', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 4', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 4', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_4-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 4', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_4', + '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_power_factor_channel_5-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_power_factor_channel_5', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 5', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 5', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_5-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 5', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_5', + '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_power_factor_channel_6-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_power_factor_channel_6', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 6', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 6', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_6-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 6', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_6', + '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_power_factor_channel_7-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_power_factor_channel_7', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 7', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 7', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_7-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 7', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_7', + '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_power_factor_channel_8-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_power_factor_channel_8', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 8', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 8', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_8-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 8', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_8', + '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_power_factor_channel_9-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_power_factor_channel_9', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Power factor channel 9', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Power factor channel 9', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_power_factor', + '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_power_factor_channel_9-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'power_factor', + : '测试无回路-多路计量cat.1 Power factor channel 9', + : , + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_power_factor_channel_9', + '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_reactive_power_channel_1-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_reactive_power_channel_1', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 1', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -12083,33 +9822,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Reactive power', + 'original_name': 'Reactive power channel 1', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s9reactivepower', + 'translation_key': 'indexed_reactive_power', + '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_9_reactive_power-state] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'reactive_power', - : 'Channel 9 Reactive power', + : '测试无回路-多路计量cat.1 Reactive power channel 1', : , : 'kvar', }), 'context': , - 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_reactive_power', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_1', 'last_changed': , 'last_reported': , 'last_updated': , - 'state': '0.45', + 'state': '0.05', }) # --- -# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_voltage-entry] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_10-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -12125,7 +9864,7 @@ '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', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_10', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -12133,7 +9872,1166 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Voltage', + 'object_id_base': 'Reactive power channel 10', + '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 channel 10', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_10-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 10', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_10', + '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_reactive_power_channel_11-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_reactive_power_channel_11', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 11', + '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 channel 11', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_11-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 11', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_11', + '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_reactive_power_channel_12-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_reactive_power_channel_12', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 12', + '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 channel 12', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_12-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 12', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_12', + '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_reactive_power_channel_13-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_reactive_power_channel_13', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 13', + '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 channel 13', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_13-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 13', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_13', + '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_reactive_power_channel_14-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_reactive_power_channel_14', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 14', + '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 channel 14', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_14-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 14', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_14', + '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_reactive_power_channel_15-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_reactive_power_channel_15', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 15', + '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 channel 15', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_15-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 15', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_15', + '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_reactive_power_channel_16-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_reactive_power_channel_16', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 16', + '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 channel 16', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_16-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 16', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_16', + '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_reactive_power_channel_17-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_reactive_power_channel_17', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 17', + '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 channel 17', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_17-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 17', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_17', + '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_reactive_power_channel_18-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_reactive_power_channel_18', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 18', + '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 channel 18', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_18-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 18', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_18', + '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_reactive_power_channel_19-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_reactive_power_channel_19', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 19', + '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 channel 19', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_19-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 19', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_19', + '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_reactive_power_channel_2-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_reactive_power_channel_2', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 2', + '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 channel 2', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_2-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 2', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_2', + '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_reactive_power_channel_20-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_reactive_power_channel_20', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 20', + '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 channel 20', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_20-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 20', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_20', + '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_reactive_power_channel_3-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_reactive_power_channel_3', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 3', + '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 channel 3', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_3-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 3', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_3', + '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_reactive_power_channel_4-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_reactive_power_channel_4', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 4', + '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 channel 4', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_4-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 4', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_4', + '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_reactive_power_channel_5-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_reactive_power_channel_5', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 5', + '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 channel 5', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_5-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 5', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_5', + '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_reactive_power_channel_6-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_reactive_power_channel_6', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 6', + '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 channel 6', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_6-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 6', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_6', + '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_reactive_power_channel_7-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_reactive_power_channel_7', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 7', + '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 channel 7', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_7-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 7', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_7', + '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_reactive_power_channel_8-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_reactive_power_channel_8', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 8', + '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 channel 8', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_8-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 8', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_8', + '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_reactive_power_channel_9-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_reactive_power_channel_9', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Reactive power channel 9', + '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 channel 9', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_reactive_power', + '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_reactive_power_channel_9-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'reactive_power', + : '测试无回路-多路计量cat.1 Reactive power channel 9', + : , + : 'kvar', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_reactive_power_channel_9', + '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_voltage_channel_1-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_voltage_channel_1', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 1', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 0, @@ -12141,26 +11039,1128 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Voltage', + 'original_name': 'Voltage channel 1', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'tuya.wrr5fva8vgffwlxqbdnzphase_s9voltage', + 'translation_key': 'indexed_voltage', + '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_9_voltage-state] +# name: test_platform_setup_and_discovery[sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'voltage', - : 'Channel 9 Voltage', + : '测试无回路-多路计量cat.1 Voltage channel 1', : , : 'V', }), 'context': , - 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_channel_9_voltage', + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_1', + '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_voltage_channel_10-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_voltage_channel_10', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 10', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 10', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_10-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 10', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_10', + '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_voltage_channel_11-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_voltage_channel_11', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 11', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 11', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_11-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 11', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_11', + '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_voltage_channel_12-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_voltage_channel_12', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 12', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 12', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_12-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 12', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_12', + '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_voltage_channel_13-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_voltage_channel_13', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 13', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 13', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_13-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 13', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_13', + '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_voltage_channel_14-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_voltage_channel_14', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 14', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 14', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_14-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 14', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_14', + '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_voltage_channel_15-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_voltage_channel_15', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 15', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 15', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_15-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 15', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_15', + '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_voltage_channel_16-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_voltage_channel_16', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 16', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 16', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_16-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 16', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_16', + '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_voltage_channel_17-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_voltage_channel_17', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 17', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 17', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_17-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 17', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_17', + '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_voltage_channel_18-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_voltage_channel_18', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 18', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 18', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_18-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 18', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_18', + '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_voltage_channel_19-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_voltage_channel_19', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 19', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 19', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_19-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 19', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_19', + '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_voltage_channel_2-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_voltage_channel_2', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 2', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 2', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_2-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 2', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_2', + '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_voltage_channel_20-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_voltage_channel_20', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 20', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 20', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_20-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 20', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_20', + '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_voltage_channel_3-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_voltage_channel_3', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 3', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 3', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_3-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 3', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_3', + '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_voltage_channel_4-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_voltage_channel_4', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 4', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 4', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_4-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 4', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_4', + '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_voltage_channel_5-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_voltage_channel_5', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 5', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 5', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_5-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 5', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_5', + '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_voltage_channel_6-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_voltage_channel_6', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 6', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 6', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_6-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 6', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_6', + '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_voltage_channel_7-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_voltage_channel_7', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 7', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 7', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_7-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 7', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_7', + '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_voltage_channel_8-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_voltage_channel_8', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 8', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 8', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_8-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 8', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_8', + '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_voltage_channel_9-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_voltage_channel_9', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Voltage channel 9', + 'options': dict({ + 'sensor': dict({ + 'suggested_display_precision': 0, + }), + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': 'Voltage channel 9', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'indexed_voltage', + '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_voltage_channel_9-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 'voltage', + : '测试无回路-多路计量cat.1 Voltage channel 9', + : , + : 'V', + }), + 'context': , + 'entity_id': 'sensor.ce_shi_wu_hui_lu_duo_lu_ji_liang_cat_1_voltage_channel_9', 'last_changed': , 'last_reported': , 'last_updated': , @@ -13967,7 +13967,7 @@ 'state': '0.12', }) # --- -# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_apparent_power-entry] +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_apparent_power_channel_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -13983,7 +13983,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_apparent_power', + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_apparent_power_channel_1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -13991,7 +13991,7 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Apparent power', + 'object_id_base': 'Apparent power channel 1', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -14002,33 +14002,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Apparent power', + 'original_name': 'Apparent power channel 1', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, + 'translation_key': 'indexed_apparent_power', '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] +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_apparent_power_channel_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'apparent_power', - : '多路计量有线demo26082501 Apparent power', + : '多路计量有线demo26082501 Apparent power channel 1', : , : 'kVA', }), 'context': , - 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_apparent_power', + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_apparent_power_channel_1', '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] +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_current_channel_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -14044,7 +14044,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_current', + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_current_channel_1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14052,7 +14052,7 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Current', + 'object_id_base': 'Current channel 1', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -14063,33 +14063,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Current', + 'original_name': 'Current channel 1', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, + 'translation_key': 'indexed_current', '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] +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_current_channel_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'current', - : '多路计量有线demo26082501 Current', + : '多路计量有线demo26082501 Current channel 1', : , : 'A', }), 'context': , - 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_current', + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_current_channel_1', '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] +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_power_channel_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -14105,7 +14105,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_power', + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_power_channel_1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14113,7 +14113,7 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Power', + 'object_id_base': 'Power channel 1', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -14124,33 +14124,33 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Power', + 'original_name': 'Power channel 1', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, + 'translation_key': 'indexed_power', '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] +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_power_channel_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'power', - : '多路计量有线demo26082501 Power', + : '多路计量有线demo26082501 Power channel 1', : , : 'kW', }), 'context': , - 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_power', + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_power_channel_1', '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] +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_power_factor_channel_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -14166,7 +14166,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_power_factor', + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_power_factor_channel_1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14174,37 +14174,37 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Power factor', + 'object_id_base': 'Power factor channel 1', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Power factor', + 'original_name': 'Power factor channel 1', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, + 'translation_key': 'indexed_power_factor', '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] +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_power_factor_channel_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'power_factor', - : '多路计量有线demo26082501 Power factor', + : '多路计量有线demo26082501 Power factor channel 1', : , }), 'context': , - 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_power_factor', + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_power_factor_channel_1', '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] +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_reactive_power_channel_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -14220,7 +14220,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_reactive_power', + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_reactive_power_channel_1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14228,7 +14228,7 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Reactive power', + 'object_id_base': 'Reactive power channel 1', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 2, @@ -14239,26 +14239,26 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Reactive power', + 'original_name': 'Reactive power channel 1', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, + 'translation_key': 'indexed_reactive_power', '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] +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_reactive_power_channel_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'reactive_power', - : '多路计量有线demo26082501 Reactive power', + : '多路计量有线demo26082501 Reactive power channel 1', : , : 'kvar', }), 'context': , - 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_reactive_power', + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_reactive_power_channel_1', 'last_changed': , 'last_reported': , 'last_updated': , @@ -14323,7 +14323,7 @@ 'state': '0.0', }) # --- -# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_voltage-entry] +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_voltage_channel_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -14339,7 +14339,7 @@ 'disabled_by': None, 'domain': 'sensor', 'entity_category': None, - 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_voltage', + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_voltage_channel_1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -14347,7 +14347,7 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Voltage', + 'object_id_base': 'Voltage channel 1', 'options': dict({ 'sensor': dict({ 'suggested_display_precision': 0, @@ -14355,26 +14355,26 @@ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Voltage', + 'original_name': 'Voltage channel 1', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': 0, - 'translation_key': None, + 'translation_key': 'indexed_voltage', '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] +# name: test_platform_setup_and_discovery[sensor.duo_lu_ji_liang_you_xian_demo26082501_voltage_channel_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'voltage', - : '多路计量有线demo26082501 Voltage', + : '多路计量有线demo26082501 Voltage channel 1', : , : 'V', }), 'context': , - 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_voltage', + 'entity_id': 'sensor.duo_lu_ji_liang_you_xian_demo26082501_voltage_channel_1', 'last_changed': , 'last_reported': , 'last_updated': , diff --git a/tests/components/tuya/snapshots/test_valve.ambr b/tests/components/tuya/snapshots/test_valve.ambr index fc17d942da4a..e8188d65591a 100644 --- a/tests/components/tuya/snapshots/test_valve.ambr +++ b/tests/components/tuya/snapshots/test_valve.ambr @@ -105,7 +105,7 @@ 'state': 'closed', }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_1_valve-entry] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_1-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -119,7 +119,7 @@ 'disabled_by': None, 'domain': 'valve', 'entity_category': None, - 'entity_id': 'valve.jie_hashui_fa_channel_1_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_1', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -127,38 +127,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Valve', + 'object_id_base': 'Valve 1', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Valve', + 'original_name': 'Valve 1', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': , - 'translation_key': 'valve', + 'translation_key': 'indexed_valve', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfsswitch_1', 'unit_of_measurement': None, }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_1_valve-state] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_1-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'water', - : 'Channel 1 Valve', + : '接HA水阀 Valve 1', : False, : , }), 'context': , - 'entity_id': 'valve.jie_hashui_fa_channel_1_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_1', 'last_changed': , 'last_reported': , 'last_updated': , 'state': 'open', }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_2_valve-entry] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_2-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -172,7 +172,7 @@ 'disabled_by': None, 'domain': 'valve', 'entity_category': None, - 'entity_id': 'valve.jie_hashui_fa_channel_2_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_2', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -180,38 +180,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Valve', + 'object_id_base': 'Valve 2', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Valve', + 'original_name': 'Valve 2', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': , - 'translation_key': 'valve', + 'translation_key': 'indexed_valve', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfsswitch_2', 'unit_of_measurement': None, }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_2_valve-state] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_2-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'water', - : 'Channel 2 Valve', + : '接HA水阀 Valve 2', : True, : , }), 'context': , - 'entity_id': 'valve.jie_hashui_fa_channel_2_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_2', 'last_changed': , 'last_reported': , 'last_updated': , 'state': 'closed', }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_3_valve-entry] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_3-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -225,7 +225,7 @@ 'disabled_by': None, 'domain': 'valve', 'entity_category': None, - 'entity_id': 'valve.jie_hashui_fa_channel_3_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_3', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -233,38 +233,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Valve', + 'object_id_base': 'Valve 3', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Valve', + 'original_name': 'Valve 3', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': , - 'translation_key': 'valve', + 'translation_key': 'indexed_valve', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfsswitch_3', 'unit_of_measurement': None, }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_3_valve-state] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_3-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'water', - : 'Channel 3 Valve', + : '接HA水阀 Valve 3', : False, : , }), 'context': , - 'entity_id': 'valve.jie_hashui_fa_channel_3_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_3', 'last_changed': , 'last_reported': , 'last_updated': , 'state': 'open', }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_4_valve-entry] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_4-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -278,7 +278,7 @@ 'disabled_by': None, 'domain': 'valve', 'entity_category': None, - 'entity_id': 'valve.jie_hashui_fa_channel_4_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_4', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -286,38 +286,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Valve', + 'object_id_base': 'Valve 4', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Valve', + 'original_name': 'Valve 4', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': , - 'translation_key': 'valve', + 'translation_key': 'indexed_valve', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfsswitch_4', 'unit_of_measurement': None, }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_4_valve-state] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_4-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'water', - : 'Channel 4 Valve', + : '接HA水阀 Valve 4', : True, : , }), 'context': , - 'entity_id': 'valve.jie_hashui_fa_channel_4_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_4', 'last_changed': , 'last_reported': , 'last_updated': , 'state': 'closed', }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_5_valve-entry] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_5-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -331,7 +331,7 @@ 'disabled_by': None, 'domain': 'valve', 'entity_category': None, - 'entity_id': 'valve.jie_hashui_fa_channel_5_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_5', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -339,38 +339,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Valve', + 'object_id_base': 'Valve 5', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Valve', + 'original_name': 'Valve 5', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': , - 'translation_key': 'valve', + 'translation_key': 'indexed_valve', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfsswitch_5', 'unit_of_measurement': None, }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_5_valve-state] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_5-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'water', - : 'Channel 5 Valve', + : '接HA水阀 Valve 5', : False, : , }), 'context': , - 'entity_id': 'valve.jie_hashui_fa_channel_5_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_5', 'last_changed': , 'last_reported': , 'last_updated': , 'state': 'open', }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_6_valve-entry] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_6-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -384,7 +384,7 @@ 'disabled_by': None, 'domain': 'valve', 'entity_category': None, - 'entity_id': 'valve.jie_hashui_fa_channel_6_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_6', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -392,38 +392,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Valve', + 'object_id_base': 'Valve 6', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Valve', + 'original_name': 'Valve 6', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': , - 'translation_key': 'valve', + 'translation_key': 'indexed_valve', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfsswitch_6', 'unit_of_measurement': None, }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_6_valve-state] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_6-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'water', - : 'Channel 6 Valve', + : '接HA水阀 Valve 6', : True, : , }), 'context': , - 'entity_id': 'valve.jie_hashui_fa_channel_6_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_6', 'last_changed': , 'last_reported': , 'last_updated': , 'state': 'closed', }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_7_valve-entry] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_7-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -437,7 +437,7 @@ 'disabled_by': None, 'domain': 'valve', 'entity_category': None, - 'entity_id': 'valve.jie_hashui_fa_channel_7_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_7', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -445,38 +445,38 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Valve', + 'object_id_base': 'Valve 7', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Valve', + 'original_name': 'Valve 7', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': , - 'translation_key': 'valve', + 'translation_key': 'indexed_valve', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfsswitch_7', 'unit_of_measurement': None, }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_7_valve-state] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_7-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'water', - : 'Channel 7 Valve', + : '接HA水阀 Valve 7', : False, : , }), 'context': , - 'entity_id': 'valve.jie_hashui_fa_channel_7_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_7', 'last_changed': , 'last_reported': , 'last_updated': , 'state': 'open', }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_8_valve-entry] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_8-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ None, @@ -490,7 +490,7 @@ 'disabled_by': None, 'domain': 'valve', 'entity_category': None, - 'entity_id': 'valve.jie_hashui_fa_channel_8_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_8', 'has_entity_name': True, 'hidden_by': None, 'icon': None, @@ -498,31 +498,31 @@ 'labels': set({ }), 'name': None, - 'object_id_base': 'Valve', + 'object_id_base': 'Valve 8', 'options': dict({ }), 'original_device_class': , 'original_icon': None, - 'original_name': 'Valve', + 'original_name': 'Valve 8', 'platform': 'tuya', 'previous_unique_id': None, 'suggested_object_id': None, 'supported_features': , - 'translation_key': 'valve', + 'translation_key': 'indexed_valve', 'unique_id': 'tuya.cijerqyssiwrf7deqzkfsswitch_8', 'unit_of_measurement': None, }) # --- -# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_channel_8_valve-state] +# name: test_platform_setup_and_discovery[valve.jie_hashui_fa_valve_8-state] StateSnapshot({ 'attributes': ReadOnlyDict({ : 'water', - : 'Channel 8 Valve', + : '接HA水阀 Valve 8', : True, : , }), 'context': , - 'entity_id': 'valve.jie_hashui_fa_channel_8_valve', + 'entity_id': 'valve.jie_hashui_fa_valve_8', 'last_changed': , 'last_reported': , 'last_updated': , diff --git a/tests/components/tuya/test_init.py b/tests/components/tuya/test_init.py index 86b814da93a2..91425c85ab60 100644 --- a/tests/components/tuya/test_init.py +++ b/tests/components/tuya/test_init.py @@ -135,13 +135,6 @@ async def test_device_registry( name=list(device_registry_entry.identifiers)[0][1] ) - for child_device_entry in dr.async_child_entries_for_config_entry( - device_registry, mock_config_entry.entry_id - ): - assert child_device_entry == snapshot( - name=list(child_device_entry.identifiers)[0][1] - ) - @pytest.mark.parametrize( ("mock_device_code", "platforms", "manufacturer", "model", "model_id", "quirks"), diff --git a/tests/components/tuya/test_sensor.py b/tests/components/tuya/test_sensor.py index 0da3ce486394..012cb22010f7 100644 --- a/tests/components/tuya/test_sensor.py +++ b/tests/components/tuya/test_sensor.py @@ -50,7 +50,7 @@ async def test_platform_setup_and_discovery( @pytest.mark.parametrize( ("mock_device_code", "expected_children", "expected_parent_phase_entities"), [ - pytest.param("zndb_qxlwffgv8avf5rrw", 20, 0, id="multi_channel"), + pytest.param("zndb_qxlwffgv8avf5rrw", 0, 120, id="multi_channel"), pytest.param("zndb_uqzhc4bx5zqwpg2m", 0, 6, id="single_channel"), ], ) @@ -64,7 +64,7 @@ async def test_indexed_phase_child_devices( expected_children: int, expected_parent_phase_entities: int, ) -> None: - """Test indexed phase sensors only move to child devices for multi-channel meters.""" + """Test indexed phase sensors stay on the main device.""" await initialize_entry(hass, mock_manager, mock_config_entry, mock_device) parent = device_registry.async_get_device_by_identifier( diff --git a/tests/components/tuya/test_valve.py b/tests/components/tuya/test_valve.py index 461210e63ab2..6e43d1ef27c2 100644 --- a/tests/components/tuya/test_valve.py +++ b/tests/components/tuya/test_valve.py @@ -53,7 +53,7 @@ async def test_single_channel_device_has_no_child_devices( assert not dr.async_child_entries_for_config_entry( device_registry, mock_config_entry.entry_id ) - entity_entry = entity_registry.async_get("valve.jie_hashui_fa_valve") + entity_entry = entity_registry.async_get("valve.jie_hashui_fa_valve_1") assert entity_entry device_entry = device_registry.async_get_device_by_identifier( (DOMAIN, mock_device.id), mock_config_entry.entry_id @@ -116,7 +116,7 @@ async def test_selective_state_update( mock_device, notification_helper, freezer, - entity_id="valve.jie_hashui_fa_channel_1_valve", + entity_id="valve.jie_hashui_fa_valve_1", dpcode="switch_1", initial_state="open", updates=updates, @@ -151,7 +151,7 @@ async def test_action( expected_commands: list[dict[str, Any]], ) -> None: """Test valve action.""" - entity_id = "valve.jie_hashui_fa_channel_1_valve" + entity_id = "valve.jie_hashui_fa_valve_1" await initialize_entry(hass, mock_manager, mock_config_entry, mock_device) state = hass.states.get(entity_id) @@ -191,7 +191,7 @@ async def test_state( expected_state: str, ) -> None: """Test valve state.""" - entity_id = "valve.jie_hashui_fa_channel_1_valve" + entity_id = "valve.jie_hashui_fa_valve_1" mock_device.status["switch_1"] = initial_status await initialize_entry(hass, mock_manager, mock_config_entry, mock_device)