Use state variable from mpchc (#59341)
This commit is contained in:
parent
b79b35abb5
commit
c44eaca533
1 changed files with 3 additions and 3 deletions
|
@ -106,13 +106,13 @@ class MpcHcDevice(MediaPlayerEntity):
|
|||
@property
|
||||
def state(self):
|
||||
"""Return the state of the device."""
|
||||
state = self._player_variables.get("statestring", None)
|
||||
state = self._player_variables.get("state", None)
|
||||
|
||||
if state is None:
|
||||
return STATE_OFF
|
||||
if state == "playing":
|
||||
if state == "2":
|
||||
return STATE_PLAYING
|
||||
if state == "paused":
|
||||
if state == "1":
|
||||
return STATE_PAUSED
|
||||
|
||||
return STATE_IDLE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue