Skip to content

Commit

Permalink
🌡️ improve for viomi.fridge.m1 (#1596)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptbsare authored Mar 27, 2024
1 parent 6b4aff5 commit 480b551
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
3 changes: 3 additions & 0 deletions custom_components/xiaomi_miot/core/device_customizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
11 changes: 4 additions & 7 deletions custom_components/xiaomi_miot/core/miio2miot_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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': {
Expand Down
16 changes: 16 additions & 0 deletions custom_components/xiaomi_miot/core/miot_specs_extend.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down

0 comments on commit 480b551

Please sign in to comment.