Skip to content

Commit 4008074

Browse files
authored
Merge pull request #1701 from kei81131/master
Add support for Linptech Human Presence Sensor ES5 (ES5BB)
2 parents d54c427 + c0ef04f commit 4008074

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

custom_components/xiaomi_gateway3/core/devices.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,19 @@
17911791
MathConv("no_one_duration", "sensor", mi="2.p.1082", min=1, max=120, entity={"units": UNIT_MINUTES, "icon": "mdi:timer-off"}),
17921792
MapConv("no_one_duration", mi="2.p.1078", map={1: 0}),
17931793
MapConv("has_someone_duration", mi="2.p.1078", map={0: 0}),
1794-
],
1794+
],
1795+
}, {
1796+
# https://home.miot-spec.com/spec/linp.sensor_occupy.es5b
1797+
27151: ["Linptech", "Human Presence Sensor ES5", "ES5BB", "linp.sensor_occupy.es5b"],
1798+
"spec": [
1799+
BoolConv("occupancy", "binary_sensor", mi="2.p.1078"),
1800+
BaseConv("illuminance", "sensor", mi="2.p.1005"),
1801+
BaseConv("battery", "sensor", mi="7.p.1003", entity=ENTITY_LAZY), # uint8
1802+
BoolConv("near_occupancy", "binary_sensor", mi="5.p.1019"), # custom close range
1803+
MapConv("event_type", "sensor", mi="5.e.1097.p.1", map={0: "Reset", 1: "OffLightLeave", 2: "OffLightExit", 3: "OffLightSleep", 4: "OffLightExit", 5: "RadarNoiseExceedMinor", 6: "RadarNoiseExceedCritical", 7: "RadarNoiseNormal", 8: "RadarNoiseError"}),
1804+
BaseConv("has_someone_duration", "sensor", mi="2.p.1081", entity={"enabled": False, "units": UNIT_MINUTES}), # uint8
1805+
BaseConv("no_one_duration", "sensor", mi="2.p.1082", entity={"enabled": False, "units": UNIT_MINUTES}) # uint8
1806+
],
17951807
}, {
17961808
8613: ["H+", "Double Wall Switch", "huca.switch.dh2"],
17971809
"spec": [

0 commit comments

Comments
 (0)