mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Revert "Use language independent variable to read MPC-HC state" (#60993)
This commit is contained in:
parent
c44eaca533
commit
e36f9f684d
@ -106,13 +106,13 @@ class MpcHcDevice(MediaPlayerEntity):
|
|||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
"""Return the state of the device."""
|
"""Return the state of the device."""
|
||||||
state = self._player_variables.get("state", None)
|
state = self._player_variables.get("statestring", None)
|
||||||
|
|
||||||
if state is None:
|
if state is None:
|
||||||
return STATE_OFF
|
return STATE_OFF
|
||||||
if state == "2":
|
if state == "playing":
|
||||||
return STATE_PLAYING
|
return STATE_PLAYING
|
||||||
if state == "1":
|
if state == "paused":
|
||||||
return STATE_PAUSED
|
return STATE_PAUSED
|
||||||
|
|
||||||
return STATE_IDLE
|
return STATE_IDLE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user