Skip to content

Commit 1fae61a

Browse files
Fix device naming
1 parent 10080d2 commit 1fae61a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

custom_components/battery_notes/coordinator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,9 @@ def _link_to_source(self) -> bool: # noqa: PLR0912
296296
device_entry = device_registry.async_get(self.device_id)
297297
if device_entry:
298298
self.device_name = (
299-
(self.subentry.title if self.subentry else None)
300-
or device_entry.name_by_user
301-
or device_entry.name
299+
self.subentry.title
300+
if self.subentry
301+
else device_entry.name_by_user or device_entry.name or ""
302302
)
303303
else:
304304
self.device_name = self.subentry.title

0 commit comments

Comments
 (0)