From 7d4083cdd376f274d6666491f519a738ebdfc55e Mon Sep 17 00:00:00 2001 From: pbalogh77 Date: Wed, 17 Apr 2019 18:56:34 +0200 Subject: [PATCH] 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. --- homeassistant/components/fibaro/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/fibaro/__init__.py b/homeassistant/components/fibaro/__init__.py index 9e60d1c0c3a..f78afbf10e5 100644 --- a/homeassistant/components/fibaro/__init__.py +++ b/homeassistant/components/fibaro/__init__.py @@ -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)