'Get updated status from API.'

def update(self):

    try:
        status = self._get_variable('doorStatus')
        _LOGGER.debug('Current    Status:    %s', status['status'])
        self._state = STATES_MAP.get(status['status'], STATE_UNKNOWN)
        self.time_in_state = status['time']
        self.signal = status['signal']
        self.sensor = status['sensor']
        self._available = True
    except requests.exceptions.ConnectionError as ex:
        _LOGGER.error('Unable    to    connect    to    server:    %(reason)s', dict(reason=ex))
        self._state = STATE_OFFLINE
    except KeyError as ex:
        _LOGGER.warning('Garadget    device    %(device)s    seems    to    be    offline', dict(device=self.device_id))
        self._state = STATE_OFFLINE
    if (self._state not in [STATE_CLOSING, STATE_OPENING]):
        if (self._unsub_listener_cover is not None):
            self._unsub_listener_cover()
            self._unsub_listener_cover = None
