Skip to content

Add device info for sonos#16263

Merged
balloob merged 2 commits intodevfrom
dev-info-sonos
Aug 29, 2018
Merged

Add device info for sonos#16263
balloob merged 2 commits intodevfrom
dev-info-sonos

Conversation

@balloob
Copy link
Copy Markdown
Member

@balloob balloob commented Aug 29, 2018

Description:

Add device info for Sonos media players.

@balloob balloob requested a review from Kane610 August 29, 2018 12:40
@balloob balloob requested a review from amelchio as a code owner August 29, 2018 12:40
@ghost ghost assigned balloob Aug 29, 2018
@ghost ghost added the in progress label Aug 29, 2018
def device_info(self):
"""Return information about the device."""
return {
'identifiers': [
Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Copy Markdown
Contributor

@amelchio amelchio left a 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 ", ""),
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member Author

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 👍

@balloob balloob merged commit 16a8858 into dev Aug 29, 2018
@balloob balloob deleted the dev-info-sonos branch August 29, 2018 14:27
@ghost ghost removed the in progress label Aug 29, 2018
@balloob balloob mentioned this pull request Sep 17, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Dec 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants