mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-08-28 21:58:08 +02:00
fixed restore from HA device registry when device name contains "-" #24
This commit is contained in:
parent
2620ea3761
commit
2c471cc981
1 changed files with 1 additions and 1 deletions
|
@ -868,7 +868,7 @@ class MikrotikControllerData:
|
|||
if entity.config_entry_id == self.config_entry.entry_id \
|
||||
and entity.domain == DEVICE_TRACKER_DOMAIN \
|
||||
and "-host-" in entity.unique_id:
|
||||
_, _, mac = entity.unique_id.split("-", 3)
|
||||
_, mac = entity.unique_id.split("-host-", 2)
|
||||
self.data["host_hass"][mac] = entity.original_name
|
||||
|
||||
# ---------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue