diff --git a/custom_components/xiaomi_gateway3/core/devices.py b/custom_components/xiaomi_gateway3/core/devices.py index cb2cc4c9..acdd9d07 100644 --- a/custom_components/xiaomi_gateway3/core/devices.py +++ b/custom_components/xiaomi_gateway3/core/devices.py @@ -1660,6 +1660,20 @@ BaseConv("has_someone_duration", "sensor", mi="2.p.1081", entity=ENTITY_DISABLED), BaseConv("no_one_duration", "sensor", mi="2.p.1082", entity=ENTITY_DISABLED), ], +}, { + # https://home.miot-spec.com/spec/linp.sensor_occupy.es3 + # https://home.mi.com/views/introduction.html?model=linp.sensor_occupy.es2 + 20731: ["Linptech", "Human Presence Sensor ES3", "ES3BB", "linp.sensor_occupy.es2"], + "spec": [ + # main sensors + BoolConv("occupancy", "binary_sensor", mi="2.p.1078"), + BaseConv("illuminance", "sensor", mi="2.p.1005"), + # other sensors + BaseConv("battery", "sensor", mi="4.p.1003", entity=ENTITY_LAZY), + BaseConv("customized_property", "binary_sensor", mi="5.p.1018"), #customized distance trigger + BaseConv("has_someone_duration", "sensor", mi="2.p.1080", entity=ENTITY_DISABLED), + BaseConv("no_one_duration", "sensor", mi="2.p.1079", entity=ENTITY_DISABLED), + ], }, { # https://github.com/AlexxIT/XiaomiGateway3/pull/1118 13617: ["xiaomi", "Motion Sensor 2s", "XMPIRO25XS", "xiaomi.motion.pir1"],