'Initialize the sensor.'

def __init__(self, hass, api, xuid):

    self._hass = hass
    self._state = STATE_UNKNOWN
    self._presence = {}
    self._xuid = xuid
    self._api = api
    profile = self._api.get_user_profile(self._xuid)
    if (profile.get('success', True) and (profile.get('code', 0) != 28)):
        self.success_init = True
        self._gamertag = profile.get('Gamertag')
        self._picture = profile.get('GameDisplayPicRaw')
    else:
        self.success_init = False
