Skip to content

Commit

Permalink
🚶 improve for walking-pad (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Nov 29, 2021
1 parent 47a39fc commit 26c2cfd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion custom_components/xiaomi_miot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,10 @@ async def async_update(self):
self._state = True if self._state_attrs.get('power') else False

if self._miot_service:
for d in ['sensor', 'binary_sensor', 'switch', 'number', 'select', 'fan', 'cover']:
for d in [
'sensor', 'binary_sensor', 'switch', 'number',
'select', 'fan', 'cover', 'number_select',
]:
pls = self.custom_config_list(f'{d}_properties') or []
if pls:
self._update_sub_entities(pls, '*', domain=d)
Expand Down
3 changes: 2 additions & 1 deletion custom_components/xiaomi_miot/core/device_customizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,8 @@
'sensor_properties': 'current_distance,current_step_count,current_calorie_consumption,'
'left_distance,left_time,working_time',
'number_properties': 'target_distance,target_time',
'select_properties': 'mode,speed_level',
'select_properties': 'mode',
'number_select_properties': 'speed_level',
},

}
Expand Down

0 comments on commit 26c2cfd

Please sign in to comment.