Skip to content

Commit

Permalink
😺 fix for xiaomi.feeder.pi2001 (#2036)
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Dec 13, 2024
1 parent a9b98aa commit 488dfff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions custom_components/xiaomi_miot/core/device_customizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down
4 changes: 3 additions & 1 deletion custom_components/xiaomi_miot/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 488dfff

Please sign in to comment.