diff --git a/custom_components/xiaomi_miot/core/device_customizes.py b/custom_components/xiaomi_miot/core/device_customizes.py index e1a12f77a..73e2eeda2 100644 --- a/custom_components/xiaomi_miot/core/device_customizes.py +++ b/custom_components/xiaomi_miot/core/device_customizes.py @@ -1618,6 +1618,9 @@ 'sensor_properties': 'pet_food_left_level,fault,desiccant_left_level,desiccant_left_time', 'switch_properties': 'compensate_switch,prevent_accumulation', }, + 'xiaomi.feeder.pi2001:pet_food_out': { + 'action_params': 1, + }, 'xiaomi.health_pot.p1': { 'select_actions': 'start_cook', }, diff --git a/custom_components/xiaomi_miot/core/utils.py b/custom_components/xiaomi_miot/core/utils.py index 88ceedbc1..50ce8f836 100644 --- a/custom_components/xiaomi_miot/core/utils.py +++ b/custom_components/xiaomi_miot/core/utils.py @@ -95,7 +95,9 @@ def custom_config_list(self, key=None, default=None): lst = self.custom_config(key) if lst is None: return default - if not isinstance(lst, list): + if isinstance(lst, (int, float, bool)): + lst = [lst] + elif not isinstance(lst, list): lst = f'{lst}'.split(',') lst = list(map(lambda x: x.strip(), lst)) return lst