'Update device state.'

def update(self):

    try:
        self._profile = self._steamod.user.profile(self._account)
        if (self._profile.current_game[2] is None):
            self._game = 'None'
        else:
            self._game = self._profile.current_game[2]
        self._state = {1: STATE_ONLINE, 2: STATE_BUSY, 3: STATE_AWAY, 4: STATE_SNOOZE, 5: STATE_TRADE, 6: STATE_PLAY}.get(self._profile.status, 'Offline')
        self._name = self._profile.persona
        self._avatar = self._profile.avatar_medium
    except self._steamod.api.HTTPTimeoutError as error:
        _LOGGER.warning(error)
        self._game = self._state = self._name = self._avatar = None
