|
发表于 2024-10-18 16:12:06
|
显示全部楼层
本帖最后由 baobaobuku 于 2024-10-18 16:13 编辑
可以等待几分钟或者用自定义在config文件夹下建一个xiaomi_gateway3.py,把下面这段放进去
from custom_components.xiaomi_gateway3.core.devices import *
DEVICES = [{
20179: ["LeTianPai", "Presence Sensor POP", "rhj.sensor_occupy.l730a"],
"spec": [
BoolConv("occupancy", "binary_sensor", mi="2.p.1078"),
MathConv("temperature", "sensor", mi="7.p.1001", round=1),
BaseConv("humidity", "sensor", mi="7.p.1002"),
BaseConv("illuminance", "sensor", mi="2.p.1005"),
MapConv("occupancy_status", "sensor", mi="2.p.1078", map={0: "无人存在", 1: "有人存在", 2: "有人微动", 3: "有人远离", 4: "有人接近", 5: "有人静态", 6: "有人移动", 7: "有人进入"}),
# BaseConv("no-one-duration", "sensor", mi="2.p.1079"),
# BaseConv("has-someone-duration", "sensor", mi="2.p.1080"),
],
}] + DEVICES
|
|