mirror of
https://github.com/home-assistant/core
synced 2024-09-06 10:29:55 +02:00
Add Pressure Sensor (ylcg) device support to Tuya (#58294)
This commit is contained in:
parent
3cdfb84b79
commit
7d0fc8ca98
@ -161,6 +161,15 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = {
|
||||
),
|
||||
TAMPER_BINARY_SENSOR,
|
||||
),
|
||||
# Pressure Sensor
|
||||
# https://developer.tuya.com/en/docs/iot/categoryylcg?id=Kaiuz3kc2e4gm
|
||||
"ylcg": (
|
||||
TuyaBinarySensorEntityDescription(
|
||||
key=DPCode.PRESSURE_STATE,
|
||||
on_value="alarm",
|
||||
),
|
||||
TAMPER_BINARY_SENSOR,
|
||||
),
|
||||
# Smoke Detector
|
||||
# https://developer.tuya.com/en/docs/iot/categoryywbj?id=Kaiuz3f6sf952
|
||||
"ywbj": (
|
||||
|
@ -206,6 +206,8 @@ class DPCode(str, Enum):
|
||||
POWDER_SET = "powder_set" # Powder
|
||||
POWER_GO = "power_go"
|
||||
PRESENCE_STATE = "presence_state"
|
||||
PRESSURE_STATE = "pressure_state"
|
||||
PRESSURE_VALUE = "pressure_value"
|
||||
PUMP_RESET = "pump_reset" # Water pump reset
|
||||
RECORD_SWITCH = "record_switch" # Recording switch
|
||||
RELAY_STATUS = "relay_status"
|
||||
|
@ -21,6 +21,7 @@ from homeassistant.const import (
|
||||
DEVICE_CLASS_ILLUMINANCE,
|
||||
DEVICE_CLASS_PM25,
|
||||
DEVICE_CLASS_POWER,
|
||||
DEVICE_CLASS_PRESSURE,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
DEVICE_CLASS_VOLATILE_ORGANIC_COMPOUNDS,
|
||||
DEVICE_CLASS_VOLTAGE,
|
||||
@ -227,6 +228,16 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
|
||||
# Emergency Button
|
||||
# https://developer.tuya.com/en/docs/iot/categorysos?id=Kaiuz3oi6agjy
|
||||
"sos": BATTERY_SENSORS,
|
||||
# Pressure Sensor
|
||||
# https://developer.tuya.com/en/docs/iot/categoryylcg?id=Kaiuz3kc2e4gm
|
||||
"ylcg": (
|
||||
SensorEntityDescription(
|
||||
key=DPCode.PRESSURE_VALUE,
|
||||
device_class=DEVICE_CLASS_PRESSURE,
|
||||
state_class=STATE_CLASS_MEASUREMENT,
|
||||
),
|
||||
*BATTERY_SENSORS,
|
||||
),
|
||||
# Smoke Detector
|
||||
# https://developer.tuya.com/en/docs/iot/categoryywbj?id=Kaiuz3f6sf952
|
||||
"ywbj": (
|
||||
|
Loading…
Reference in New Issue
Block a user