Skip to content

Commit

Permalink
💡 add miio2miot for philips.light.downlight (#498)
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Apr 5, 2022
1 parent 38c7052 commit 0b97f8d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions custom_components/xiaomi_miot/core/miio2miot_specs.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,20 @@ def cbk(prop, params, props, **kwargs):
'prop.2.6': {'prop': 'cid', 'template': '{{ 2 if val == 360 else 1 }}'},
},
},
'philips.light.downlight': {
'miio_specs': {
'prop.2.1': {'prop': 'power', 'setter': True, 'format': 'onoff'},
'prop.2.2': {'prop': 'bright', 'setter': True},
'prop.2.3': {
'prop': 'cct',
'setter': True,
'template': '{{ ((max - min) * value / 100 + min) | round }}',
'set_template': '{% set num = ((value - min) / (max - min) * 100) | round %}'
'{{ [num if num > 0 else 1] }}',
},
'prop.2.4': {'prop': 'snm', 'setter': 'apply_fixed_scene'},
},
},
'philips.light.moonlight': {
'extend_model': 'philips.light.bulb',
'miio_specs': {
Expand Down
2 changes: 1 addition & 1 deletion custom_components/xiaomi_miot/core/miot_local_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
# 'philips.light.bulb', # issues/254
# 'philips.light.cbulb', # miio2miot
'philips.light.dlight',
'philips.light.downlight',
# 'philips.light.downlight', # miio2miot
'philips.light.sread3',
'philips.light.strip2',
'pwzn.light.apple',
Expand Down

1 comment on commit 0b97f8d

@al-one
Copy link
Owner Author

@al-one al-one commented on 0b97f8d Apr 18, 2022

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.