mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Handle Squeezebox issues (#5566)
* Handle Squeezebox issues * Fix double logging
This commit is contained in:
parent
36e47473c5
commit
fb49c588e5
@ -182,7 +182,7 @@ class SqueezeBoxDevice(MediaPlayerDevice):
|
||||
@property
|
||||
def state(self):
|
||||
"""Return the state of the device."""
|
||||
if 'power' in self._status and self._status['power'] == '0':
|
||||
if 'power' in self._status and self._status['power'] == 0:
|
||||
return STATE_OFF
|
||||
if 'mode' in self._status:
|
||||
if self._status['mode'] == 'pause':
|
||||
@ -213,8 +213,16 @@ class SqueezeBoxDevice(MediaPlayerDevice):
|
||||
"status", "-", "1", "tags:{tags}"
|
||||
.format(tags=tags))
|
||||
|
||||
if response is False:
|
||||
return
|
||||
|
||||
self._status = response.copy()
|
||||
|
||||
try:
|
||||
self._status.update(response["playlist_loop"][0])
|
||||
except KeyError:
|
||||
pass
|
||||
try:
|
||||
self._status = response.copy()
|
||||
self._status.update(response["remoteMeta"])
|
||||
except KeyError:
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user