mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
cmus remove IO from properties (#6030)
This commit is contained in:
parent
4addcccfac
commit
eb9400de4c
@ -90,11 +90,9 @@ class CmusDevice(MediaPlayerDevice):
|
||||
@property
|
||||
def state(self):
|
||||
"""Return the media state."""
|
||||
if 'status' not in self.status:
|
||||
self.update()
|
||||
if self.status['status'] == 'playing':
|
||||
if self.status.get('status') == 'playing':
|
||||
return STATE_PLAYING
|
||||
elif self.status['status'] == 'paused':
|
||||
elif self.status.get('status') == 'paused':
|
||||
return STATE_PAUSED
|
||||
else:
|
||||
return STATE_OFF
|
||||
|
Loading…
x
Reference in New Issue
Block a user