Switch what is used for unique identifier (#37581)
* Switch what is used for device identifier type_string can be changed if new device types are added based on same driver. * No need to slugify unique id
This commit is contained in:
1 parent
d0632ab636
commit
d0983b69df
3 files changed
+6
-3
No files matched your search
@@ -328,7 +328,7 @@ class RfxtrxDevice(Entity):
|
||||
self._event = event
|
||||
self._state = datas[ATTR_STATE]
|
||||
self._should_fire_event = datas[ATTR_FIRE_EVENT]
|
||||
self._unique_id = f"{slugify(self._event.device.type_string.lower())}_{slugify(self._event.device.id_string.lower())}"
|
||||
self._unique_id = f"{event.device.packettype:x}_{event.device.subtype:x}_{event.device.id_string}"
|
||||
|
||||
@property
|
||||
def should_poll(self):
|
||||
|
||||
Reference in new issue
Block a user