mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 06:17:07 +00:00
Set Yamaha unique_id (#84730)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
parent
72671b93d2
commit
65aaea6ec6
@ -205,6 +205,11 @@ class YamahaDevice(MediaPlayerEntity):
|
||||
self._play_status = None
|
||||
self._name = name
|
||||
self._zone = receiver.zone
|
||||
if self.receiver.serial_number is not None:
|
||||
# Since not all receivers will have a serial number and set a unique id
|
||||
# the default name of the integration may not be changed
|
||||
# to avoid a breaking change.
|
||||
self._attr_unique_id = f"{self.receiver.serial_number}_{self._zone}"
|
||||
|
||||
def update(self) -> None:
|
||||
"""Get the latest details from the device."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user