mirror of
https://github.com/home-assistant/core.git
synced 2025-08-06 06:05:10 +02:00
Update steam_online.py
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user