Add support for single phase power meter aqcz in Tuya (#126470)

This commit is contained in:
blackovercoat 2024-11-27 01:38:52 +07:00 committed by GitHub
parent 132a8cc31b
commit 35f6ae0759
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -254,6 +254,31 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
entity_registry_enabled_default=False,
),
),
# Single Phase power meter
# Note: Undocumented
"aqcz": (
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
"cobj": (