From 61b061aedb108f037dc53e045131d1214d08d5b4 Mon Sep 17 00:00:00 2001 From: Hugh696 <81367125+Hugh696@users.noreply.github.com> Date: Tue, 24 Dec 2024 17:38:55 +0800 Subject: [PATCH 1/2] Update miio2miot_specs.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改获取室外温湿度的prop 优化音量控制 --- custom_components/xiaomi_miot/core/miio2miot_specs.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/custom_components/xiaomi_miot/core/miio2miot_specs.py b/custom_components/xiaomi_miot/core/miio2miot_specs.py index 70324a41b..74209126c 100644 --- a/custom_components/xiaomi_miot/core/miio2miot_specs.py +++ b/custom_components/xiaomi_miot/core/miio2miot_specs.py @@ -2598,13 +2598,14 @@ def cbk(prop, params, props, **kwargs): 'prop.3.3': {'prop': 'vertical_swing', 'setter': 'set_vertical', 'format': 'onoff'}, 'prop.3.4': {'prop': 'vertical_rt', 'setter': 'set_ver_pos'}, 'prop.4.1': {'prop': 'temp_dec', 'template': '{{ value|default(0,true)/10.0 }}'}, - 'prop.4.2': {'prop': 'temp_dec', 'template': '{{ value|default(0,true)/10.0 }}'}, + 'prop.4.2': {'prop': 'ot_run_temp'}, 'prop.4.3': {'prop': 'humidity'}, - 'prop.4.4': {'prop': 'humidity'}, + 'prop.4.4': {'prop': 'ot_humidity'}, 'prop.5.1': { 'prop': 'volume', 'setter': 'set_volume', - 'set_template': '{{ (value/10)|int }}', + 'template': '{{ (value/10)|int }}', + 'set_template': '{{ value|int }}', }, 'prop.6.1': {'prop': 'lcd_level', 'setter': 'set_lcd_level'}, }, From 4b4f7fe6127a78442228c356f079eb3eb21a8eec Mon Sep 17 00:00:00 2001 From: Hugh696 <81367125+Hugh696@users.noreply.github.com> Date: Tue, 24 Dec 2024 17:41:05 +0800 Subject: [PATCH 2/2] Update miot_specs_extend.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 调整风速列表的顺序 优化音量控制 优化扫风角度控制 --- .../xiaomi_miot/core/miot_specs_extend.json | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/custom_components/xiaomi_miot/core/miot_specs_extend.json b/custom_components/xiaomi_miot/core/miot_specs_extend.json index bdc09f43d..631453fea 100644 --- a/custom_components/xiaomi_miot/core/miot_specs_extend.json +++ b/custom_components/xiaomi_miot/core/miot_specs_extend.json @@ -1644,12 +1644,12 @@ { "iid": 1, "value-list": [ - {"value": 0, "description": "Auto"}, + {"value": 4, "description": "Quiet"}, {"value": 1, "description": "Low"}, {"value": 2, "description": "Medium"}, {"value": 3, "description": "High"}, - {"value": 4, "description": "Quiet"}, - {"value": 5, "description": "Turbo"} + {"value": 5, "description": "Turbo"}, + {"value": 0, "description": "Auto"} ] } ] @@ -1660,7 +1660,17 @@ { "iid": 1, "access": ["read", "write"], - "value-range": [0, 70, 10] + "value-range": [0, 7, 1] + } + ] + }, + { + "iid": 3, + "properties": [ + { + "iid": 4, + "access": ["read", "write"], + "value-range": [0, 60, 1] } ] }