mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 17:57:11 +00:00
Implement unique_id to prevent duplicate devices
This commit is contained in:
parent
b0b88e606c
commit
ce22f3c82d
@ -1 +1 @@
|
||||
Subproject commit 9637d5d26516873b8a04a3c62b9596163c822a2d
|
||||
Subproject commit b0b12e20e0f61df849c414c2dfbcf9923f784631
|
@ -78,6 +78,11 @@ class SonosDevice(MediaPlayerDevice):
|
||||
""" Returns the name of the device. """
|
||||
return self._name
|
||||
|
||||
@property
|
||||
def unique_id(self):
|
||||
""" Returns a unique id. """
|
||||
return "{}.{}".format(self.__class__, self._player.uid)
|
||||
|
||||
@property
|
||||
def state(self):
|
||||
""" Returns the state of the device. """
|
||||
|
Loading…
x
Reference in New Issue
Block a user