New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add device info for sonos #16263
Add device info for sonos #16263
Conversation
def device_info(self): | ||
"""Return information about the device.""" | ||
return { | ||
'identifiers': [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identifiers should be sets with tuples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know nothing about device_info
itself :)
(SONOS_DOMAIN, self._unique_id) | ||
], | ||
'name': self._name, | ||
'model': self._model.replace("Sonos ", ""), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a recent firmware change so "Sonos " might not be right for all players (cf. #15604).
On the other hand, Sonos is pretty agressive about updates so maybe it no longer matters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the string is not found, it does nothing 👍
Description:
Add device info for Sonos media players.