Add Smoke Detector (ywbj) device support to Tuya (#58170)
This commit is contained in:
parent
ea2e94a4e5
commit
3c52bc214d
3 changed files with 40 additions and 0 deletions
|
@ -57,6 +57,13 @@ BATTERY_SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||
icon="mdi:battery",
|
||||
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key=DPCode.BATTERY_VALUE,
|
||||
name="Battery",
|
||||
device_class=DEVICE_CLASS_BATTERY,
|
||||
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
),
|
||||
)
|
||||
|
||||
# All descriptions can be found here. Mostly the Integer data types in the
|
||||
|
@ -198,6 +205,18 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
|
|||
# Emergency Button
|
||||
# https://developer.tuya.com/en/docs/iot/categorysos?id=Kaiuz3oi6agjy
|
||||
"sos": BATTERY_SENSORS,
|
||||
# Smoke Detector
|
||||
# https://developer.tuya.com/en/docs/iot/categoryywbj?id=Kaiuz3f6sf952
|
||||
"ywbj": (
|
||||
SensorEntityDescription(
|
||||
key=DPCode.SMOKE_SENSOR_VALUE,
|
||||
name="Smoke Amount",
|
||||
icon="mdi:smoke-detector",
|
||||
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
|
||||
device_class=STATE_CLASS_MEASUREMENT,
|
||||
),
|
||||
*BATTERY_SENSORS,
|
||||
),
|
||||
# Vibration Sensor
|
||||
# https://developer.tuya.com/en/docs/iot/categoryzd?id=Kaiuz3a5vrzno
|
||||
"zd": BATTERY_SENSORS,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue