diff --git a/custom_components/xiaomi_miot/core/device_customizes.py b/custom_components/xiaomi_miot/core/device_customizes.py index 522f2beae..7e294546d 100644 --- a/custom_components/xiaomi_miot/core/device_customizes.py +++ b/custom_components/xiaomi_miot/core/device_customizes.py @@ -1271,6 +1271,9 @@ 2: 0, # Descent-limit }, }, + 'viomi.fridge.m1': { + 'sensor_properties': 'fridge.temperature', + }, 'viomi.hood.v1': { 'main_miot_services': 'hood-2', 'number_properties': 'off_delay_time', diff --git a/custom_components/xiaomi_miot/core/miio2miot_specs.py b/custom_components/xiaomi_miot/core/miio2miot_specs.py index 98789c673..f965796ae 100644 --- a/custom_components/xiaomi_miot/core/miio2miot_specs.py +++ b/custom_components/xiaomi_miot/core/miio2miot_specs.py @@ -1243,13 +1243,9 @@ def cbk(prop, params, props, **kwargs): # ["Mode","RCSetTemp","FCSetTemp","RCSet","Error","IndoorTemp","SmartCool","SmartFreeze"] # ["none",8 ,-15 ,"on" ,0 ,30 ,"off" ,"off"] # 'chunk_properties': 8, - 'miio_commands': [ - { - 'method': 'get_prop', - 'params': ['RCSetTemp','FCSetTemp', 'RCSet', 'ScreenOn', 'Error', 'SmartCool', 'SmartFreeze', 'IndoorTemp'], - 'values': ['RCSetTemp','FCSetTemp', 'RCSet', 'ScreenOn', 'Error', 'SmartCool', 'SmartFreeze', 'IndoorTemp'], - }, - ], + 'chunk_properties': 1, + 'miio_props': ['ScreenOn', 'Error', 'SmartCool', 'SmartFreeze'], + 'entity_attrs': ['ScreenOn', 'Error', 'SmartCool', 'SmartFreeze'], 'miio_specs': { 'prop.2.1': {'prop': 'Mode', 'setter': 'setMode', 'dict': { 'smart': 1, @@ -1262,6 +1258,7 @@ def cbk(prop, params, props, **kwargs): 'prop.3.3': {'prop': 'RCSetTemp'}, 'prop.4.1': {'prop': 'FCSetTemp', 'setter': 'setFCSetTemp'}, 'prop.4.2': {'prop': 'FCSetTemp'}, + 'prop.2.2': {'prop': 'IndoorTemp'}, }, }, 'viomi.juicer.v1': { diff --git a/custom_components/xiaomi_miot/core/miot_specs_extend.json b/custom_components/xiaomi_miot/core/miot_specs_extend.json index 77a3d5386..53d0582b0 100644 --- a/custom_components/xiaomi_miot/core/miot_specs_extend.json +++ b/custom_components/xiaomi_miot/core/miot_specs_extend.json @@ -766,6 +766,22 @@ ] } ], + "viomi.fridge.m1": [ + { + "iid": 2, + "properties": [ + { + "iid": 2, + "type": "urn:miot-spec-v2:property:temperature", + "description": "Indoor Temperature", + "format": "float", + "access": ["read"], + "unit": "celsius", + "value-range": [-40, 125, 1] + } + ] + } + ], "viomi.vacuum.v7": [ {