Skip to content

Commit

Permalink
🛀 fix miio2miot for yeelink.bhf_light.v5/v6 (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Mar 18, 2022
1 parent 0beb892 commit 8982181
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions custom_components/xiaomi_miot/core/miio2miot_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,11 @@ def cbk(prop, params, props, **kwargs):
'prop': 'fan_speed_idx',
'setter': 'set_bh_mode',
'template': 'yeelink_bhf_light_v5_fan_levels',
'set_template': '{{ [props.bh_mode, value - 1] }}',
'set_template': '{{ ['
'props.bh_mode,'
'1 if value <= 1 else '
'3 if props.bh_mode == "warmwind" else '
'2] }}',
},
'action.3.1': {'setter': 'bh_mode', 'set_template': '{{ ["bh_off", 0] }}'},
},
Expand Down Expand Up @@ -996,7 +1000,11 @@ def cbk(prop, params, props, **kwargs):
'prop': 'fan_speed_idx',
'setter': 'set_bh_mode',
'template': 'yeelink_bhf_light_v5_fan_levels',
'set_template': '{{ [props.bh_mode, value - 1] }}',
'set_template': '{{ ['
'props.bh_mode,'
'1 if value <= 1 else '
'3 if props.bh_mode == "warmwind" else '
'2] }}',
},
'prop.3.102': {
'prop': 'bh_mode', 'setter': True,
Expand Down

0 comments on commit 8982181

Please sign in to comment.