diff --git a/custom_components/xiaomi_miot/core/device_customizes.py b/custom_components/xiaomi_miot/core/device_customizes.py index a123ca5c8..b83bd13f2 100644 --- a/custom_components/xiaomi_miot/core/device_customizes.py +++ b/custom_components/xiaomi_miot/core/device_customizes.py @@ -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', diff --git a/custom_components/xiaomi_miot/core/miot_spec.py b/custom_components/xiaomi_miot/core/miot_spec.py index 88941e022..bbf6f99d2 100644 --- a/custom_components/xiaomi_miot/core/miot_spec.py +++ b/custom_components/xiaomi_miot/core/miot_spec.py @@ -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