Skip to content

Commit

Permalink
Update miio2miot_specs.py
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one authored Nov 6, 2023
1 parent 260d1c0 commit 28bbf11
Showing 1 changed file with 65 additions and 70 deletions.
135 changes: 65 additions & 70 deletions custom_components/xiaomi_miot/core/miio2miot_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,71 @@ def cbk(prop, params, props, **kwargs):
'viomi.waterheater.u11': 'viomi.waterheater.u7',
'viomi.waterheater.u12': 'viomi.waterheater.u7',

'xiaomi.aircondition.ma2': {
'chunk_properties': 1,
'miio_specs': {
'prop.2.1': {
'prop': 'power',
'setter': True,
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.2.2': {'prop': 'mode', 'setter': 'set_mode', 'dict': {
2: 1,
3: 2,
4: 3,
5: 4,
}, 'default': 2},
'prop.2.3': {'prop': 'settemp', 'setter': 'set_temp'},
'prop.2.4': {
'prop': 'energysave',
'setter': True,
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.2.5': {
'prop': 'auxheat',
'setter': True,
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.2.6': {
'prop': 'sleep',
'setter': True,
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.2.7': {
'prop': 'dry',
'setter': True,
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.3.1': {'prop': 'wind_level', 'setter': True},
'prop.3.2': {
'prop': 'swing',
'setter': True,
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.4.1': {'prop': 'temperature'},
'prop.5.1': {
'prop': 'beep',
'setter': True,
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.6.1': {
'prop': 'light',
'setter': True,
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
},
},
'xiaomi.aircondition.ma4': 'xiaomi.aircondition.ma2',
'xiaomi.aircondition.ma6': 'xiaomi.aircondition.ma2',

'xjx.toilet.pro': {
'miio_specs': {
'prop.2.1': {'prop': 'seating'},
Expand Down Expand Up @@ -2096,76 +2161,6 @@ def cbk(prop, params, props, **kwargs):
'zhimi.aircondition.ma3': 'zhimi.aircondition.ma1',
'zhimi.aircondition.ma4': 'zhimi.aircondition.ma1',
'zhimi.aircondition.za1': 'zhimi.aircondition.ma1',
'xiaomi.aircondition.ma2': {
'chunk_properties': 1,
'miio_specs': {
'prop.2.1': {'prop': 'power',
'setter': 'set_power',
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.2.2': {'prop': 'mode', 'setter': 'set_mode', 'dict': {
2: 1,
3: 2,
4: 3,
5: 4,
}, 'default': 2},
'prop.2.3': {
'prop': 'settemp',
'setter': 'set_temp',
},
'prop.2.4': {'prop': 'energysave',
'setter': 'set_energysave',
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.2.5': {'prop': 'auxheat',
'setter': 'set_auxheat',
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.2.6': {'prop': 'sleep',
'setter': 'set_sleep',
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.2.7': {'prop': 'dry',
'setter': 'set_dry',
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.3.1': {'prop': 'wind_level', 'setter': 'set_wind_level', 'dict': {
0: 0, #auto
1: 1,
2: 2,
3: 3,
4: 4,
5: 5,
6: 6,
7: 7,
}},
'prop.3.2': {'prop': 'swing',
'setter': 'set_swing',
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.4.1': {'prop': 'temperature'},
'prop.5.1': {'prop': 'beep',
'setter': 'set_beep',
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.6.1': {'prop': 'light',
'setter': 'set_light',
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
},
},

'xiaomi.aircondition.ma4': 'xiaomi.aircondition.ma2',
'xiaomi.aircondition.ma6': 'xiaomi.aircondition.ma2',

'zhimi.airmonitor.v1': {
'miio_specs': {
'prop.2.1': {'prop': 'aqi'},
Expand Down

0 comments on commit 28bbf11

Please sign in to comment.