Skip to content

Commit

Permalink
🔟 fix chunk_properties option
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed May 22, 2021
1 parent 833cc46 commit 87f75b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions custom_components/xiaomi_miot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,10 @@ async def async_update(self):
p = v.get('piid')
rmp[f'{s}{p}'] = k
max_properties = self.custom_config('chunk_properties', 12)
try:
max_properties = int(max_properties)
except (TypeError, ValueError):
max_properties = 10
results = await self.hass.async_add_executor_job(
partial(self.miot_device.get_properties_for_mapping, max_properties=max_properties)
)
Expand Down

0 comments on commit 87f75b2

Please sign in to comment.