From 4d22768936672b8b437860ec998ae7b934229401 Mon Sep 17 00:00:00 2001 From: Hugh696 <81367125+Hugh696@users.noreply.github.com> Date: Tue, 24 Dec 2024 10:45:44 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9D=84=EF=B8=8F=20fix=20miio2miot=20for=20zh?= =?UTF-8?q?imi.aircondition.v1=20(#2185)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom_components/xiaomi_miot/core/miio2miot_specs.py | 9 ++++----- .../xiaomi_miot/core/miot_specs_extend.json | 10 ++++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/custom_components/xiaomi_miot/core/miio2miot_specs.py b/custom_components/xiaomi_miot/core/miio2miot_specs.py index a0f3c7ec6..70324a41b 100644 --- a/custom_components/xiaomi_miot/core/miio2miot_specs.py +++ b/custom_components/xiaomi_miot/core/miio2miot_specs.py @@ -2602,12 +2602,11 @@ def cbk(prop, params, props, **kwargs): 'prop.4.3': {'prop': 'humidity'}, 'prop.4.4': {'prop': 'humidity'}, 'prop.5.1': { - 'prop': 'volume_level', - 'setter': 'set_volume_sw', - 'template': '{{ (value*14.286)|int }}', - 'set_template': '{{ [(value/14.285)|int] }}', + 'prop': 'volume', + 'setter': 'set_volume', + 'set_template': '{{ (value/10)|int }}', }, - 'prop.6.1': {'prop': 'lcd_level', 'setter': 'set_lcd'}, + 'prop.6.1': {'prop': 'lcd_level', 'setter': 'set_lcd_level'}, }, }, diff --git a/custom_components/xiaomi_miot/core/miot_specs_extend.json b/custom_components/xiaomi_miot/core/miot_specs_extend.json index ba50ebf30..8c10aa6ec 100644 --- a/custom_components/xiaomi_miot/core/miot_specs_extend.json +++ b/custom_components/xiaomi_miot/core/miot_specs_extend.json @@ -1653,6 +1653,16 @@ ] } ] + }, + { + "iid": 5, + "properties": [ + { + "iid": 1, + "access": ["read", "write"], + "value-range": [0, 70, 10] + } + ] } ], "zhimi.airfresh.va4":[