Bugfix for HA Issue 7292, 9412 - switch to gamertag to receive ssl image url (#11315)

This commit is contained in:
Rene Nulsch 2017-12-27 09:24:37 +01:00 committed by Pascal Vizeli
parent aa8db784d5
commit e5cc5a58e1

View File

@ -57,12 +57,12 @@ class XboxSensor(Entity):
self._api = api
# get profile info
profile = self._api.get_user_profile(self._xuid)
profile = self._api.get_user_gamercard(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')
self._gamertag = profile.get('gamertag')
self._picture = profile.get('gamerpicSmallSslImagePath')
else:
self.success_init = False