mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Use state variable from mpchc (#59341)
This commit is contained in:
parent
b79b35abb5
commit
c44eaca533
@ -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…
x
Reference in New Issue
Block a user