async def async_device_update(self, warning: bool=True) -> None:
    "Process 'update' or 'async_update' from entity.\n\n        This method is a coroutine.\n        "
    if self._update_staged:
        return
    self._update_staged = True
    if self.parallel_updates:
        (await self.parallel_updates.acquire())
    try:
        if hasattr(self, 'async_update'):
            task = self.hass.async_create_task(self.async_update())
        elif hasattr(self, 'update'):
            task = self.hass.async_add_executor_job(self.update)
        else:
            return
        if (not warning):
            (await task)
            return
        (finished, _) = (await asyncio.wait([task], timeout=SLOW_UPDATE_WARNING))
        for done in finished:
            exc = done.exception()
            if exc:
                raise exc
            return
        _LOGGER.warning('Update of %s is taking over %s seconds', self.entity_id, SLOW_UPDATE_WARNING)
        (await task)
    finally:
        self._update_staged = False
        if self.parallel_updates:
            self.parallel_updates.release()
Process 'update' or 'async_update' from entity.

This method is a coroutine.
async def async_device_update(self, warning: bool=True) -> None:
    "Process 'update' or 'async_update' from entity.\n\n        This method is a coroutine.\n        "
    if self._update_staged:
        return
    self._update_staged = True
    if self.parallel_updates:
        (await self.parallel_updates.acquire())
    try:
        if hasattr(self, 'async_update'):
            task = self.hass.async_create_task(self.async_update())
        elif hasattr(self, 'update'):
            task = self.hass.async_add_executor_job(self.update)
        else:
            return
        if (not warning):
            (await task)
            return
        (finished, _) = (await asyncio.wait([task], timeout=SLOW_UPDATE_WARNING))
        for done in finished:
            exc = done.exception()
            if exc:
                raise exc
            return
        _LOGGER.warning('Update of %s is taking over %s seconds', self.entity_id, SLOW_UPDATE_WARNING)
        (await task)
    finally:
        self._update_staged = False
        if self.parallel_updates:
            self.parallel_updates.release()