Change STATE_UNKOWN to None (#20337)
* Change STATE_UNKOWN to None * Change STATE_UNKOWN to None * tests * tests * tests * tests * tests * style * fix comments * fix comments * update fan test
This commit is contained in:
1 parent
074fcd96ed
commit
1bd31e3459
64 files changed
+147
-168
No files matched your search
@@ -57,7 +57,7 @@ class XboxSensor(Entity):
|
||||
def __init__(self, hass, api, xuid):
|
||||
"""Initialize the sensor."""
|
||||
self._hass = hass
|
||||
self._state = STATE_UNKNOWN
|
||||
self._state = None
|
||||
self._presence = {}
|
||||
self._xuid = xuid
|
||||
self._api = api
|
||||
@@ -117,5 +117,5 @@ class XboxSensor(Entity):
|
||||
def update(self):
|
||||
"""Update state data from Xbox API."""
|
||||
presence = self._api.get_user_presence(self._xuid)
|
||||
self._state = presence.get('state', STATE_UNKNOWN)
|
||||
self._state = presence.get('state')
|
||||
self._presence = presence.get('devices', {})
|
||||
Reference in new issue
Block a user