Revert "Use language independent variable to read MPC-HC state" (#60993)

This commit is contained in:
Charles Garwood 2021-12-04 09:13:05 -05:00 committed by GitHub
parent c44eaca533
commit e36f9f684d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,13 +106,13 @@ class MpcHcDevice(MediaPlayerEntity):
@property
def state(self):
"""Return the state of the device."""
state = self._player_variables.get("state", None)
state = self._player_variables.get("statestring", None)
if state is None:
return STATE_OFF
if state == "2":
if state == "playing":
return STATE_PLAYING
if state == "1":
if state == "paused":
return STATE_PAUSED
return STATE_IDLE