Add support for Tuya energy data for WKCZ devices (#119635)

Add support for energy sensors for  WKCZ devices
This commit is contained in:
azerty9971 2024-06-17 10:59:36 +02:00 committed by GitHub
parent 496338fa4e
commit 75fa0b91d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -221,6 +221,27 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
),
TuyaSensorEntityDescription(
key=DPCode.CUR_CURRENT,
translation_key="current",
device_class=SensorDeviceClass.CURRENT,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
),
TuyaSensorEntityDescription(
key=DPCode.CUR_POWER,
translation_key="power",
device_class=SensorDeviceClass.POWER,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
),
TuyaSensorEntityDescription(
key=DPCode.CUR_VOLTAGE,
translation_key="voltage",
device_class=SensorDeviceClass.VOLTAGE,
state_class=SensorStateClass.MEASUREMENT,
entity_registry_enabled_default=False,
),
),
# CO Detector
# https://developer.tuya.com/en/docs/iot/categorycobj?id=Kaiuz3u1j6q1v