Add CO Detector (cobj) device support to Tuya (#58292)
This commit is contained in:
parent
581d9ec281
commit
0a272669ed
3 changed files with 33 additions and 3 deletions
|
@ -14,6 +14,7 @@ from homeassistant.components.sensor import (
|
|||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
DEVICE_CLASS_CO,
|
||||
DEVICE_CLASS_CO2,
|
||||
DEVICE_CLASS_CURRENT,
|
||||
DEVICE_CLASS_HUMIDITY,
|
||||
|
@ -94,6 +95,17 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
|
|||
),
|
||||
*BATTERY_SENSORS,
|
||||
),
|
||||
# CO Detector
|
||||
# https://developer.tuya.com/en/docs/iot/categorycobj?id=Kaiuz3u1j6q1v
|
||||
"cobj": (
|
||||
SensorEntityDescription(
|
||||
key=DPCode.CO_VALUE,
|
||||
name="Carbon Monoxide",
|
||||
device_class=DEVICE_CLASS_CO,
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
),
|
||||
*BATTERY_SENSORS,
|
||||
),
|
||||
# Switch
|
||||
# https://developer.tuya.com/en/docs/iot/s?id=K9gf7o5prgf7s
|
||||
"kg": (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue