|
本帖最后由 leo755008 于 2024-10-24 15:25 编辑
大家好,近期购买的子擎存在传感器Loong,加进Xiaomi Gateway 3后无法显示相关资料,厂牌显示未知,请教该如何设定才能显示如米家app上的调整功能? 先向大家说声谢谢。
如果改用Miot,可以看到其他資訊,但感測器的數據並不能作為自動化的設定,例如自動化的選項中不能單純選擇"當有人..則如何",所以我現在是改成當無人狀態超過1min,則關掉電燈,這樣便會拉長關燈的時間。
2024/10/24-15:23更新:
我參考網上資訊,做了個PY,資料如下,結果訊息都變未知,希望有人可以一起測試看看https://home.miot-spec.com/s/izq.sensor_occupy.ble
from custom_components.xiaomi_gateway3.core.devices import *
DEVICES = [{
18788: ["izq", "ZQ Occupy Sensor Loong", "izq.sensor_occupy.ble"],
"spec": [
BoolConv("occupancy", "binary_sensor", mi="2.p.1078"),
MathConv("detection_distance", "number", mi="2.p.1", multiply=0.01),
MathConv("no_one_determine_time", "number", mi="2.p.2", min=0, max=10000),
MathConv("has_someone_detection-sensitivity", "sensor", mi="2.p.3"),
MathConv("no_one_detection_sensitivity", "sensor", mi="2.p.4"),
MathConv("continuous_detection_distance", "sensor", mi="2.p.5"),
MathConv("illuminance", "sensor", mi="2.p.1005"),
MathConv("idle_time", "sensor", mi="2.p.1079", multiply=60), # diagnostic
MathConv("has_someone_duration", "sensor", mi="2.p.1080"),
BaseConv("indicator-light", "switch", mi="3.p.1032"), # config
BaseConv("battery_level", "sensor", mi="4.p.1003"),
MapConv("occupancy_status", "sensor", mi="2.p.1078", map={0: "NoOne", 1: " Has One "}),
],
}] + DEVICES
2024/10/24:
子擎loong PIID資訊:https://home.miot-spec.com/spec/izq.sensor_occupy.ble
我在Devices.py上找到以下子擎Lite的代碼,我試著改改看。
{
10356: ["ZiQing", "IZQ Presence Sensor Lite", "IZQ-24", "izq.sensor_occupy.24"],
"spec": [
BoolConv("occupancy", "binary_sensor", mi="2.p.1"),
MathConv("no_one_determine_time", "number", mi="2.p.2", min=0, max=10000),
MathConv("has_someone_duration", "sensor", mi="2.p.3"),
MathConv("idle_time", "sensor", mi="2.p.4", multiply=60), # diagnostic
MathConv("illuminance", "sensor", mi="2.p.5"),
MathConv("distance", "sensor", mi="2.p.6", multiply=0.01),
BaseConv("led", "switch", mi="3.p.1"), # config
BaseConv("pir", "switch", mi="3.p.3"),
MathConv("detect_range", "number", mi="3.p.2", min=0, max=8, step=0.1),
MathConv("enterin_confirm_time", "number", mi="3.p.5", min=0, max=60),
MapConv("occupancy_status", "sensor", mi="2.p.1", map={0: "NoOne", 1: "EnterIn", 2: "SmallMove", 3: "MicroMove", 4: "Approaching", 5: "MoveAway"}),
],
|
|