Skip to content

Commit

Permalink
❄️ fix for xiaomi.aircondition.ma* (#1835)
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Aug 25, 2024
1 parent e7bcf3e commit 4672892
Showing 1 changed file with 12 additions and 122 deletions.
134 changes: 12 additions & 122 deletions custom_components/xiaomi_miot/core/miio2miot_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1601,7 +1601,7 @@ def cbk(prop, params, props, **kwargs):
'viomi.waterheater.u11': 'viomi.waterheater.u7',
'viomi.waterheater.u12': 'viomi.waterheater.u7',

'xiaomi.aircondition.ma2': {
'xiaomi.aircondition.ma1': {
'chunk_properties': 1,
'miio_specs': {
'prop.2.1': {
Expand All @@ -1610,12 +1610,7 @@ def cbk(prop, params, props, **kwargs):
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.2.2': {'prop': 'mode', 'setter': 'set_mode', 'dict': {
2: 1,
3: 2,
4: 4,
5: 3,
}, 'default': 2},
'prop.2.2': {'prop': 'mode', 'setter': 'set_mode'},
'prop.2.3': {'prop': 'settemp', 'setter': 'set_temp'},
'prop.2.4': {
'prop': 'energysave',
Expand Down Expand Up @@ -1663,131 +1658,26 @@ def cbk(prop, params, props, **kwargs):
},
},
},
'xiaomi.aircondition.ma4': {
'chunk_properties': 1,
'xiaomi.aircondition.ma2': {
'extend_model': 'xiaomi.aircondition.ma1',
'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: 4,
5: 3,
}, '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.3.3': {'prop': 'swingh',
'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)] }}',
},
'prop.3.3': {},
},
},
'xiaomi.aircondition.ma5': 'xiaomi.aircondition.ma4',
'xiaomi.aircondition.ma6': {
'chunk_properties': 1,
'xiaomi.aircondition.ma4': {
'extend_model': 'xiaomi.aircondition.ma1',
'miio_specs': {
'prop.2.1': {
'prop': 'power',
'setter': True,
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
'prop.2.2': {'prop': 'mode', 'setter': True},
'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',
'prop.3.3': {
'prop': 'swingh',
'setter': True,
'template': '{{ value != 0 }}',
'set_template': '{{ [value|int(1)] }}',
},
},
},
'xiaomi.aircondition.ma5': 'xiaomi.aircondition.ma4',
'xiaomi.aircondition.ma6': 'xiaomi.aircondition.ma1',
'xiaomi.aircondition.ma9': 'xiaomi.aircondition.ma1',

'xjx.toilet.pro': {
'miio_specs': {
Expand Down

1 comment on commit 4672892

@al-one
Copy link
Owner Author

@al-one al-one commented on 4672892 Aug 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.