<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def update(self) -> None: """Retrieve updated device state."""

        if self.next_allowed_update is not None and \
                datetime.utcnow() < self.next_allowed_update:
            return

        self.next_allowed_update = None
        await self.api._update_device_state()
        self._device_json = self._device['device_info']