Skip to content

Commit 52b8e36

Browse files
committed
🔧 fix for extend miot spec (#2075)
1 parent d24eaee commit 52b8e36

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

custom_components/xiaomi_miot/core/device_customizes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,11 +2076,11 @@
20762076
'brightness_for_off': 2,
20772077
},
20782078
'zhimi.fan.fb1': {
2079-
'switch_properties': 'alarm,horizontal_swing,vertical_swing,oscillating,h_swing_back,v_swing_back,brightness',
2079+
'switch_properties': 'horizontal_swing,vertical_swing,oscillating,h_swing_back,v_swing_back,brightness,alarm',
20802080
'number_properties': 'timing',
20812081
'percentage_property': 'stepless_fan_level',
2082-
'select_properties': 'mode,horizontal_angle,vertical_angle',
2083-
'button_properties': 'h_swing_step_move,v_swing_step_move'
2082+
'select_properties': 'mode,fan_level,horizontal_angle,vertical_angle',
2083+
'button_properties': 'h_swing_step_move,v_swing_step_move',
20842084
},
20852085
'zhimi.fan.za3': {
20862086
'miot_type': 'urn:miot-spec-v2:device:fan:0000A005:zhimi-za3:3',

custom_components/xiaomi_miot/core/miot_spec.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,8 @@ def is_integer(self):
888888
'uint8', 'uint16', 'uint32', 'uint64',
889889
]:
890890
return True
891+
if self.format in ['string']:
892+
return False
891893
if self.value_list:
892894
return True
893895
return False

0 commit comments

Comments
 (0)