Skip to content

Commit

Permalink
💡 fix brightness for yeelight night mode (#1276)
Browse files Browse the repository at this point in the history
  • Loading branch information
detecti1 committed Aug 24, 2023
1 parent 87ababf commit 765d907
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion custom_components/xiaomi_miot/core/miio2miot_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1732,9 +1732,15 @@ def cbk(prop, params, props, **kwargs):
},
'yeelink.light.ceiling6': {
'extend_model': 'yeelink.mirror.bm1',
'miio_props': ['nl_br'],
'miio_specs': {
'prop.2.2': {
'prop': 'bright',
'setter': True,
'template': '{{ value if props.nl_br|int == 0 else props.nl_br|default(value)|int }}',
},
'prop.2.4': {
'prop': 'nl_br',
'prop': 'active_mode',
'setter': 'set_ps',
'template': '{{ 2 if value|int else 1 }}',
'set_template': '{{ ["nightlight","on" if value == 2 else "off"] }}',
Expand Down

0 comments on commit 765d907

Please sign in to comment.