|
1730 | 1730 | }, { |
1731 | 1731 | # https://home.miot-spec.com/spec/linp.motion.hs1bb2 |
1732 | 1732 | 20692: ["Linptech", "Motion Sensor 3", "HS3BB", "blt.3.1kgrbasoo4k03"], |
| 1733 | + # https://github.com/AlexxIT/XiaomiGateway3/pull/1118 |
| 1734 | + 13617: ["xiaomi", "Motion Sensor 2s", "XMPIRO25XS", "xiaomi.motion.pir1"], |
1733 | 1735 | "spec": [ |
1734 | 1736 | # main sensors |
1735 | 1737 | ConstConv("motion", "binary_sensor", mi="2.e.1008", value=True), |
1736 | 1738 | BaseConv("illuminance", "sensor", mi="2.p.1005"), |
| 1739 | + BaseConv("custom_no_motion_time", "sensor", mi="2.p.1053", entity={"units": UNIT_MINUTES, "icon": "mdi:timer"}), |
1737 | 1740 | # other sensors |
1738 | | - BaseConv("battery", "sensor", mi="3.p.1003"), # uint8 |
| 1741 | + MathConv("no_motion_duration", "sensor", mi="2.p.1024", entity={"enabled": False, "units": UNIT_SECONDS, "icon": "mdi:timer"}), |
| 1742 | + BaseConv("battery", "sensor", mi="3.p.1003"), |
1739 | 1743 | ], |
1740 | 1744 | }, { |
1741 | 1745 | # https://home.miot-spec.com/spec/linp.sensor_occupy.es3 |
|
1752 | 1756 | BaseConv("no_one_duration", "sensor", mi="2.p.1079", entity={"enabled": False, "units": UNIT_MINUTES}), # uint8 |
1753 | 1757 | BoolConv("led", "binary_sensor", mi="3.p.1"), # bool, config |
1754 | 1758 | ], |
1755 | | -}, { |
1756 | | - # https://github.com/AlexxIT/XiaomiGateway3/pull/1118 |
1757 | | - 13617: ["xiaomi", "Motion Sensor 2s", "XMPIRO25XS", "xiaomi.motion.pir1"], |
1758 | | - "spec": [ |
1759 | | - # miot format |
1760 | | - ConstConv("motion", "binary_sensor", mi="2.e.1008", value=True), |
1761 | | - BaseConv("illuminance", "sensor", mi="2.p.1005"), |
1762 | | - BaseConv("battery", "sensor", mi="3.p.1003"), |
1763 | | - BaseConv("idle_time", "sensor", mi="2.p.1024"), # no-motion-duration |
1764 | | - # BaseConv("idle_time", mi="2.p.1053"), # custom-no-motion-time |
1765 | | - ], |
1766 | 1759 | }, { |
1767 | 1760 | 8613: ["H+", "Double Wall Switch", "huca.switch.dh2"], |
1768 | 1761 | "spec": [ |
|
2128 | 2121 | MapConv("action", mi="5.e.1014.p.1", map={1: BUTTON_1_HOLD, 2: BUTTON_2_HOLD, 3: BUTTON_3_HOLD, 4: BUTTON_4_HOLD}), |
2129 | 2122 | ], |
2130 | 2123 | # "ttl": "6h" # battery every 6 hours |
| 2124 | +}, { |
| 2125 | + 21003: ["Linptech", "Temperature Humidity Sensor KS2", "KS2BB", "linp.sensor_ht.ks2bb"], |
| 2126 | + "spec": [ |
| 2127 | + # main sensors |
| 2128 | + BLEFloatConv("temperature", "sensor", mi=18433, round=1), # float |
| 2129 | + BLEFloatConv("humidity", "sensor", mi=18440, round=1), # float |
| 2130 | + BLEByteConv("battery", "sensor", mi=20483), # uint8 |
| 2131 | + MathConv("temperature", mi="2.p.1001", round=1), |
| 2132 | + MathConv("humidity", mi="2.p.1002", round=1), |
| 2133 | + BaseConv("battery", mi="4.p.1003", entity=ENTITY_LAZY), |
| 2134 | + BaseConv("action", "sensor"), |
| 2135 | + ConstConv("action", mi="5.e.1012", value=BUTTON_SINGLE), |
| 2136 | + ConstConv("action", mi="5.e.1013", value=BUTTON_DOUBLE), |
| 2137 | + ConstConv("action", mi="5.e.1014", value=BUTTON_HOLD), |
| 2138 | + ], |
2131 | 2139 | }, { |
2132 | 2140 | # https://github.com/AlexxIT/XiaomiGateway3/pull/1303 |
2133 | 2141 | 17825: [None, "Eight scene knob switch", "cxw.remote.ble006"], |
|
3450 | 3458 | BaseConv("backlight", "switch", mi="8.p.1"), |
3451 | 3459 | BaseConv("led", "switch", mi="8.p.2"), |
3452 | 3460 | ] |
| 3461 | +}, { |
| 3462 | + # https://home.miot-spec.com/spec/linp.light.lx2bcw |
| 3463 | + 23071: ["Linptech", "Linp Human presence smart light", "LP2", "linp.light.lx2bcw"], |
| 3464 | + "spec": [ |
| 3465 | + BaseConv("light", "light", mi="2.p.1"), |
| 3466 | + BrightnessConv("brightness", mi="2.p.2", max=100), |
| 3467 | + ColorTempKelvin("color_temp", mi="2.p.3", mink=2700, maxk=6500), |
| 3468 | + MapConv("mode", "select", mi="2.p.7", map={0: "None", 1: "TV", 2: "Reading", 3: "Computer", 4: "Guest", 5: "Entertainment", 6: "Lighting", 7: "Night Light", 8: "Warm"}), |
| 3469 | + MapConv("power_on_state", "select", mi="2.p.9", map={0: "Default", 1: "On", 2: "Off"}, entity=ENTITY_CONFIG), |
| 3470 | + MathConv("light_off_gradient_time", "number", mi="2.p.10", min=0, max=10, entity={"category": "config", "enabled": False, "units": UNIT_SECONDS}), |
| 3471 | + MathConv("light_on_gradient_time", "number", mi="2.p.11", min=0, max=10, entity={"category": "config", "enabled": False, "units": UNIT_SECONDS}), |
| 3472 | + BoolConv("occupancy", "binary_sensor", mi="5.p.1"), |
| 3473 | + MathConv("no_one_determine_time", "number", mi="5.p.2", min=0, max=10000, entity={"category": "config", "units": UNIT_SECONDS}), |
| 3474 | + MathConv("has_one_duration", "sensor", mi="5.p.3", min=0, max=30, entity={"category": "diagnostic", "enabled": False, "units": UNIT_MINUTES}), |
| 3475 | + MathConv("no_one_duration", "sensor", mi="5.p.4", min=0, max=30, entity={"category": "diagnostic", "enabled": False, "units": UNIT_MINUTES}), |
| 3476 | + MathConv("illuminance", "sensor", mi="5.p.5", min=0, max=1000), |
| 3477 | + BaseConv("link_human_sensor", "switch", mi="4.p.2"), |
| 3478 | + MathConv("link_human_lux_threshold", "number", mi="4.p.3", min=0, max=1000, entity={"category": "config", "units": "lx"}), |
| 3479 | + MapConv("human_trigger_lv", "select", mi="4.p.4", map={0: "One Region", 1: "Two Region", 2: "Three Region"}, entity=ENTITY_CONFIG), |
| 3480 | + MapConv("sensitivity", "select", mi="6.p.6", map={0: "Low", 1: "Middle", 2: "High", 3: "User-defined"}, entity=ENTITY_CONFIG), |
| 3481 | + MapConv("radar_function_onoff", "select", mi="6.p.12", map={0: "RADAR ON", 1: "RADAR OFF"}), |
| 3482 | + MathConv("shielding_distance", "number", mi="6.p.2", min=0, max=255, entity={"category": "config", "enabled": False, "mode": "slider"}), |
| 3483 | + ], |
3453 | 3484 | }, { |
3454 | 3485 | # https://home.miot-spec.com/spec/linp.light.lp1bc |
3455 | 3486 | 19653: ["Linptech", "Human Presence-Sensing Flat Panel Light", "LP1", "linp.light.lp1bc"], |
|
0 commit comments