mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Changed scene unique IDs (#22987)
There was a potential unique ID collission which caused problems for some users, as scenes and devices are enumerated separately, so the same ID could be assigned to in they are unnamed. So I changed the unique ID generation for scenes to avoid this, which is a breaking change wrt scenes.
This commit is contained in:
parent
7a9c9031af
commit
7d4083cdd3
@ -220,9 +220,9 @@ class FibaroController():
|
||||
room_name = self._room_map[device.roomID].name
|
||||
device.room_name = room_name
|
||||
device.friendly_name = '{} {}'.format(room_name, device.name)
|
||||
device.ha_id = '{}_{}_{}'.format(
|
||||
device.ha_id = 'scene_{}_{}_{}'.format(
|
||||
slugify(room_name), slugify(device.name), device.id)
|
||||
device.unique_id_str = "{}.{}".format(
|
||||
device.unique_id_str = "{}.scene.{}".format(
|
||||
self.hub_serial, device.id)
|
||||
self._scene_map[device.id] = device
|
||||
self.fibaro_devices['scene'].append(device)
|
||||
|
Loading…
x
Reference in New Issue
Block a user