Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions homeassistant/components/unifi/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,11 @@ def update_items(controller, async_add_entities, tracked):

tracked[device_id] = UniFiDeviceTracker(device, controller)
new_tracked.append(tracked[device_id])
LOGGER.debug("New UniFi device tracker %s (%s)", device.name, device.mac)
LOGGER.debug(
"New UniFi device tracker %s (%s)",
device.name or device.model,
device.mac,
)

if new_tracked:
async_add_entities(new_tracked)
Expand Down Expand Up @@ -311,7 +315,7 @@ def source_type(self):
@property
def name(self) -> str:
"""Return the name of the device."""
return self.device.name
return self.device.name or self.device.model

@property
def unique_id(self) -> str:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/unifi/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"config_flow": true,
"documentation": "https://www.home-assistant.io/components/unifi",
"requirements": [
"aiounifi==9"
"aiounifi==10"
],
"dependencies": [],
"codeowners": [
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ aiopvapi==1.6.14
aioswitcher==2019.4.26

# homeassistant.components.unifi
aiounifi==9
aiounifi==10

# homeassistant.components.wwlln
aiowwlln==1.0.0
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ aionotion==1.1.0
aioswitcher==2019.4.26

# homeassistant.components.unifi
aiounifi==9
aiounifi==10

# homeassistant.components.wwlln
aiowwlln==1.0.0
Expand Down