|
@@ -380,13 +380,12 @@ class TuyaLocalDevice(object):
|
|
|
await self.async_refresh()
|
|
await self.async_refresh()
|
|
|
cached_state = self._get_cached_state()
|
|
cached_state = self._get_cached_state()
|
|
|
|
|
|
|
|
- possible = await self._hass.async_add_executor_job(
|
|
|
|
|
|
|
+ for matched in await self._hass.async_add_executor_job(
|
|
|
possible_matches,
|
|
possible_matches,
|
|
|
cached_state,
|
|
cached_state,
|
|
|
- )
|
|
|
|
|
- for match in possible:
|
|
|
|
|
|
|
+ ):
|
|
|
await asyncio.sleep(0)
|
|
await asyncio.sleep(0)
|
|
|
- yield match
|
|
|
|
|
|
|
+ yield matched
|
|
|
|
|
|
|
|
async def async_inferred_type(self):
|
|
async def async_inferred_type(self):
|
|
|
best_match = None
|
|
best_match = None
|