Skip to content

Commit

Permalink
🔧 fix for extend miot spec (#2075)
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Dec 31, 2024
1 parent d24eaee commit 52b8e36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/xiaomi_miot/core/device_customizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2076,11 +2076,11 @@
'brightness_for_off': 2,
},
'zhimi.fan.fb1': {
'switch_properties': 'alarm,horizontal_swing,vertical_swing,oscillating,h_swing_back,v_swing_back,brightness',
'switch_properties': 'horizontal_swing,vertical_swing,oscillating,h_swing_back,v_swing_back,brightness,alarm',
'number_properties': 'timing',
'percentage_property': 'stepless_fan_level',
'select_properties': 'mode,horizontal_angle,vertical_angle',
'button_properties': 'h_swing_step_move,v_swing_step_move'
'select_properties': 'mode,fan_level,horizontal_angle,vertical_angle',
'button_properties': 'h_swing_step_move,v_swing_step_move',
},
'zhimi.fan.za3': {
'miot_type': 'urn:miot-spec-v2:device:fan:0000A005:zhimi-za3:3',
Expand Down
2 changes: 2 additions & 0 deletions custom_components/xiaomi_miot/core/miot_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,8 @@ def is_integer(self):
'uint8', 'uint16', 'uint32', 'uint64',
]:
return True
if self.format in ['string']:
return False
if self.value_list:
return True
return False
Expand Down

1 comment on commit 52b8e36

@al-one
Copy link
Owner Author

@al-one al-one commented on 52b8e36 Dec 31, 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.