Skip to content

Commit

Permalink
add Indoor Temp sensor entity for viomi.fridge.m1
Browse files Browse the repository at this point in the history
  • Loading branch information
ptbsare committed Mar 27, 2024
1 parent 7e359ee commit 42d0fff
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 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
5 changes: 3 additions & 2 deletions custom_components/xiaomi_miot/core/miio2miot_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1244,8 +1244,8 @@ def cbk(prop, params, props, **kwargs):
# ["none",8 ,-15 ,"on" ,0 ,30 ,"off" ,"off"]
# 'chunk_properties': 8,
'chunk_properties': 1,
'miio_props': ['ScreenOn', 'Error', 'SmartCool', 'SmartFreeze', 'IndoorTemp'],
'entity_attrs': ['ScreenOn', 'Error', 'SmartCool', 'SmartFreeze', 'IndoorTemp'],
'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 @@ -1258,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 42d0fff

Please sign in to comment.