Skip to content
Snippets Groups Projects
Unverified Commit a7c6abc5 authored by Artur Pragacz's avatar Artur Pragacz Committed by GitHub
Browse files

Always assign unique_id in Onkyo (#120543)

parent 79ba3150
No related branches found
No related tags found
No related merge requests found
......@@ -320,14 +320,11 @@ class OnkyoMediaPlayer(MediaPlayerEntity):
name = receiver.name
identifier = receiver.identifier
self._attr_name = f"{name}{' ' + ZONES[zone] if zone != 'main' else ''}"
if receiver.discovered:
if zone == "main":
# keep legacy unique_id
self._attr_unique_id = f"{name}_{identifier}"
else:
self._attr_unique_id = f"{identifier}_{zone}"
if receiver.discovered and zone == "main":
# keep legacy unique_id
self._attr_unique_id = f"{name}_{identifier}"
else:
self._attr_unique_id = None
self._attr_unique_id = f"{identifier}_{zone}"
self._zone = zone
self._source_mapping = sources
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment