Move Z-Wave refresh value service out of task (#93866)

pull/93869/head
Raman Gupta 2023-05-31 11:52:01 -04:00 committed by GitHub
parent 22e7c9cc76
commit cb616cdf4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ class ZWaveBaseEntity(Entity):
async def async_poll_value(self, refresh_all_values: bool) -> None:
"""Poll a value."""
if not refresh_all_values:
self.hass.async_create_task(self._async_poll_value(self.info.primary_value))
await self._async_poll_value(self.info.primary_value)
LOGGER.info(
(
"Refreshing primary value %s for %s, "
@ -92,7 +92,7 @@ class ZWaveBaseEntity(Entity):
return
for value_id in self.watched_value_ids:
self.hass.async_create_task(self._async_poll_value(value_id))
await self._async_poll_value(value_id)
LOGGER.info(
(