mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +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
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
"""Return the media state."""
|
"""Return the media state."""
|
||||||
if 'status' not in self.status:
|
if self.status.get('status') == 'playing':
|
||||||
self.update()
|
|
||||||
if self.status['status'] == 'playing':
|
|
||||||
return STATE_PLAYING
|
return STATE_PLAYING
|
||||||
elif self.status['status'] == 'paused':
|
elif self.status.get('status') == 'paused':
|
||||||
return STATE_PAUSED
|
return STATE_PAUSED
|
||||||
else:
|
else:
|
||||||
return STATE_OFF
|
return STATE_OFF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user