Skip to content

Commit

Permalink
v1
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Sep 24, 2024
1 parent c589738 commit b6db51f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/xiaomi_miot/core/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ def init_converters(self):
return

for d in [
'sensor', 'binary_sensor', 'switch', 'number', 'select',
'fan', 'cover', 'button', 'scanner', 'number_select',
'sensor', 'binary_sensor', 'switch', 'number', 'select', 'button',
# 'fan', 'cover', 'scanner', 'number_select',
]:
pls = self.custom_config_list(f'{d}_properties') or []
if not pls:
Expand All @@ -254,6 +254,8 @@ def init_converters(self):
elif prop.is_bool:
conv = MiotPropValueConv(prop.full_name, d, prop=prop, value=True)
self.converters.append(conv)
elif d == 'number' and not prop.value_range:
continue
else:
desc = bool(prop.value_list and d in ['sensor', 'select'])
self.converters.append(MiotPropConv(prop.full_name, d, prop=prop, desc=desc))
Expand Down

0 comments on commit b6db51f

Please sign in to comment.