From b4974670c06c9bcbc424d5be92d4a61240f985b1 Mon Sep 17 00:00:00 2001 From: mattreim <80219712+mattreim@users.noreply.github.com> Date: Wed, 9 Oct 2024 11:49:53 +0200 Subject: [PATCH] Removal of `config/temperature` for various Xiaomi devices (#7827) * Remove config/temperature from xiaomi_wxkg11lm_mini_switch.json * Remove config/temperature from xiaomi_mccgq11lm_openclose_sensor.json * Remove config/temperature from lumi_sensor_wleak_aq1.json * Remove config/temperature from lumi_motion_ac01.json * Remove config/temperature from lumi_vibration_aq1.json * Remove config/temperature from xiaomi_rtcgqq11lm_presence_sensor.json --- devices/xiaomi/lumi_motion_ac01.json | 10 ---- devices/xiaomi/lumi_sensor_wleak_aq1.json | 11 ----- devices/xiaomi/lumi_vibration_aq1.json | 11 ----- .../xiaomi_mccgq11lm_openclose_sensor.json | 10 ---- .../xiaomi_rtcgqq11lm_presence_sensor.json | 47 ++++++++++++------- .../xiaomi/xiaomi_wxkg11lm_mini_switch.json | 11 ----- 6 files changed, 31 insertions(+), 69 deletions(-) diff --git a/devices/xiaomi/lumi_motion_ac01.json b/devices/xiaomi/lumi_motion_ac01.json index b67924bff4..13a6a2c18d 100644 --- a/devices/xiaomi/lumi_motion_ac01.json +++ b/devices/xiaomi/lumi_motion_ac01.json @@ -221,16 +221,6 @@ "name": "config/sensitivitymax", "static": 2 }, - { - "name": "config/temperature", - "awake": true, - "parse": { - "fn": "xiaomi:special", - "at": "0x00F7", - "idx": "0x03", - "eval": "Item.val = Attr.val * 100" - } - }, { "name": "config/triggerdistance", "parse": { diff --git a/devices/xiaomi/lumi_sensor_wleak_aq1.json b/devices/xiaomi/lumi_sensor_wleak_aq1.json index 49d9c69bb0..9cb5a5493d 100644 --- a/devices/xiaomi/lumi_sensor_wleak_aq1.json +++ b/devices/xiaomi/lumi_sensor_wleak_aq1.json @@ -81,17 +81,6 @@ { "name": "config/reachable" }, - { - "name": "config/temperature", - "awake": true, - "parse": { - "fn": "xiaomi:special", - "mf": "0x115F", - "at": "0xFF01", - "idx": "0x03", - "eval": "Item.val = Attr.val * 100" - } - }, { "name": "state/lastupdated" }, diff --git a/devices/xiaomi/lumi_vibration_aq1.json b/devices/xiaomi/lumi_vibration_aq1.json index 6206b38991..ec4c1c1fa1 100644 --- a/devices/xiaomi/lumi_vibration_aq1.json +++ b/devices/xiaomi/lumi_vibration_aq1.json @@ -134,17 +134,6 @@ "name": "config/sensitivitymax", "static": 2 }, - { - "name": "config/temperature", - "awake": true, - "parse": { - "fn": "xiaomi:special", - "mf": "0x115F", - "at": "0xFF01", - "idx": "0x03", - "eval": "Item.val = Attr.val * 100" - } - }, { "name": "state/lastupdated" }, diff --git a/devices/xiaomi/xiaomi_mccgq11lm_openclose_sensor.json b/devices/xiaomi/xiaomi_mccgq11lm_openclose_sensor.json index a10f6dbe2f..8ae8535292 100644 --- a/devices/xiaomi/xiaomi_mccgq11lm_openclose_sensor.json +++ b/devices/xiaomi/xiaomi_mccgq11lm_openclose_sensor.json @@ -87,16 +87,6 @@ { "name": "config/reachable" }, - { - "name": "config/temperature", - "awake": true, - "parse": { - "fn": "xiaomi:special", - "at": "0xFF01", - "idx": "0x03", - "eval": "Item.val = Attr.val * 100" - } - }, { "name": "state/lastupdated" }, diff --git a/devices/xiaomi/xiaomi_rtcgqq11lm_presence_sensor.json b/devices/xiaomi/xiaomi_rtcgqq11lm_presence_sensor.json index c80a33f160..3f0ea8561c 100644 --- a/devices/xiaomi/xiaomi_rtcgqq11lm_presence_sensor.json +++ b/devices/xiaomi/xiaomi_rtcgqq11lm_presence_sensor.json @@ -46,6 +46,19 @@ }, { "name": "attr/swversion", + "parse": { + "fn": "zcl:attr", + "ep": "0x01", + "cl": "0x0000", + "at": "0x0001", + "eval": "Item.val = '0.0.0_' + ('0000' + Attr.val.toString()).slice(-4)" + }, + "read": { + "fn": "zcl:attr", + "ep": "0x01", + "cl": "0x0000", + "at": "0x0001" + }, "refresh.interval": 86400 }, { @@ -58,9 +71,9 @@ "name": "config/battery", "awake": true, "parse": { - "at": "0xff01", - "ep": 1, "fn": "xiaomi:special", + "mf": "0x115F", + "at": "0xFF01", "idx": "0x01", "script": "xiaomi_battery.js" } @@ -75,17 +88,6 @@ { "name": "config/reachable" }, - { - "name": "config/temperature", - "awake": true, - "parse": { - "at": "0xff01", - "ep": 1, - "eval": "Item.val = Attr.val * 100", - "fn": "xiaomi:special", - "idx": "0x03" - } - }, { "name": "state/lastupdated" }, @@ -138,6 +140,19 @@ }, { "name": "attr/swversion", + "parse": { + "fn": "zcl:attr", + "ep": "0x01", + "cl": "0x0000", + "at": "0x0001", + "eval": "Item.val = '0.0.0_' + ('0000' + Attr.val.toString()).slice(-4)" + }, + "read": { + "fn": "zcl:attr", + "ep": "0x01", + "cl": "0x0000", + "at": "0x0001" + }, "refresh.interval": 86400 }, { @@ -150,9 +165,9 @@ "name": "config/battery", "awake": true, "parse": { - "at": "0xff01", - "ep": 1, "fn": "xiaomi:special", + "mf": "0x115F", + "at": "0xFF01", "idx": "0x01", "script": "xiaomi_battery.js" } @@ -193,4 +208,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/devices/xiaomi/xiaomi_wxkg11lm_mini_switch.json b/devices/xiaomi/xiaomi_wxkg11lm_mini_switch.json index 3f2ee56111..ff39148542 100644 --- a/devices/xiaomi/xiaomi_wxkg11lm_mini_switch.json +++ b/devices/xiaomi/xiaomi_wxkg11lm_mini_switch.json @@ -84,17 +84,6 @@ { "name": "config/reachable" }, - { - "name": "config/temperature", - "awake": true, - "parse": { - "at": "0xFF01", - "ep": 1, - "fn": "xiaomi:special", - "idx": "0x03", - "eval": "Item.val = Attr.val * 100" - } - }, { "name": "state/buttonevent" },