- 积分
- 220
- 金钱
- 213
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
中级会员
 
- 积分
- 220
- 金钱
- 213
- HASS币
- 0
|
发表于 2024-12-7 23:08:11
|
显示全部楼层
代码部分照抄楼主大佬,
from custom_components.xiaomi_gateway3.core.devices import *
###领普ES3
DEVICES = [{
20731: ["Linp", "linp.sensor_occupy.es3", "ES3"],
"spec": [
# main sensors
BoolConv("occupancy", "binary_sensor", mi="2.p.1078"), #触发
BaseConv("illuminance", "sensor", mi="2.p.1005"), #亮度
BaseConv("battery", "sensor", mi="4.p.1003", entity=ENTITY_LAZY), #电池
# other sensors
],
}] + DEVICES
触发和亮度正常获取,电池始终无法显示,没有实体,问题出在哪呢? |
|