mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Update steam_online.py
This commit is contained in:
parent
a54986159c
commit
393df2da49
@ -49,6 +49,9 @@ class SteamSensor(Entity):
|
||||
def update(self):
|
||||
"""Update device state."""
|
||||
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: 'Online',
|
||||
@ -62,8 +65,6 @@ class SteamSensor(Entity):
|
||||
@property
|
||||
def device_state_attributes(self):
|
||||
"""Returns the state attributes."""
|
||||
if self._game == None:
|
||||
self._game = 'None'
|
||||
return {'Game': self._game}
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user