Exception when adding player: `ValueError: 'none' is not a valid PlayingStatus`
daniel-simpson opened this issue · 2 comments
daniel-simpson commented
Found while testing a local branch adding my HTTPS and mTLS LinkPlay players to homeassistant/core.
ValueError: 'none' is not a valid PlayingStatus
Seems like the bridge->player->properties dictionary isn't initialised with any defaults, and so if nothing is playing it is returning "none" (I guess it'd probably None
that has been stringified?).
Definitely a bit odd, but I'll add a default in the LinkPlayPlayer
's init function to be sure:
def __init__(self, bridge: LinkPlayBridge):
self.bridge = bridge
self.properties[PlayerAttribute.PLAYING_STATUS] = PlayingStatus.STOPPED
daniel-simpson commented
Happy to pick this up, though I can't assign to myself :)
daniel-simpson commented
As mentioned on the PR, my player is now correctly responding with "stop" rather than "none". Will open this back up if I spot the issue again.