Add Methane Detector (jwbj) device support to Tuya (#58328)
This commit is contained in:
parent
539fdaad69
commit
a225d28089
3 changed files with 22 additions and 0 deletions
|
@ -97,6 +97,16 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = {
|
||||||
),
|
),
|
||||||
TAMPER_BINARY_SENSOR,
|
TAMPER_BINARY_SENSOR,
|
||||||
),
|
),
|
||||||
|
# Methane Detector
|
||||||
|
# https://developer.tuya.com/en/docs/iot/categoryjwbj?id=Kaiuz40u98lkm
|
||||||
|
"jwbj": (
|
||||||
|
TuyaBinarySensorEntityDescription(
|
||||||
|
key=DPCode.CH4_SENSOR_STATE,
|
||||||
|
device_class=DEVICE_CLASS_GAS,
|
||||||
|
on_value="alarm",
|
||||||
|
),
|
||||||
|
TAMPER_BINARY_SENSOR,
|
||||||
|
),
|
||||||
# Door Window Sensor
|
# Door Window Sensor
|
||||||
# https://developer.tuya.com/en/docs/iot/s?id=K9gf48hm02l8m
|
# https://developer.tuya.com/en/docs/iot/s?id=K9gf48hm02l8m
|
||||||
"mcs": (
|
"mcs": (
|
||||||
|
|
|
@ -163,6 +163,8 @@ class DPCode(str, Enum):
|
||||||
C_F = "c_f" # Temperature unit switching
|
C_F = "c_f" # Temperature unit switching
|
||||||
CH2O_STATE = "ch2o_state"
|
CH2O_STATE = "ch2o_state"
|
||||||
CH2O_VALUE = "ch2o_value"
|
CH2O_VALUE = "ch2o_value"
|
||||||
|
CH4_SENSOR_STATE = "ch4_sensor_state"
|
||||||
|
CH4_SENSOR_VALUE = "ch4_sensor_value"
|
||||||
CHILD_LOCK = "child_lock" # Child lock
|
CHILD_LOCK = "child_lock" # Child lock
|
||||||
CO_STATE = "co_state"
|
CO_STATE = "co_state"
|
||||||
CO_STATUS = "co_status"
|
CO_STATUS = "co_status"
|
||||||
|
|
|
@ -172,6 +172,16 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
|
||||||
),
|
),
|
||||||
*BATTERY_SENSORS,
|
*BATTERY_SENSORS,
|
||||||
),
|
),
|
||||||
|
# Methane Detector
|
||||||
|
# https://developer.tuya.com/en/docs/iot/categoryjwbj?id=Kaiuz40u98lkm
|
||||||
|
"jwbj": (
|
||||||
|
SensorEntityDescription(
|
||||||
|
key=DPCode.CH4_SENSOR_VALUE,
|
||||||
|
name="Methane",
|
||||||
|
state_class=STATE_CLASS_MEASUREMENT,
|
||||||
|
),
|
||||||
|
*BATTERY_SENSORS,
|
||||||
|
),
|
||||||
# Luminance Sensor
|
# Luminance Sensor
|
||||||
# https://developer.tuya.com/en/docs/iot/categoryldcg?id=Kaiuz3n7u69l8
|
# https://developer.tuya.com/en/docs/iot/categoryldcg?id=Kaiuz3n7u69l8
|
||||||
"ldcg": (
|
"ldcg": (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue