Skip to content

Commit

Permalink
default nickname to host name if missing
Browse files Browse the repository at this point in the history
  • Loading branch information
rsnodgrass committed Oct 8, 2020
1 parent ea1d928 commit 53ea14e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions custom_components/eero_tracker/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ def _update_tracked_devices(self, network_id, devices_json_obj):

# create mapping of mac addresses to nicknames for lookup by device_name (if a nickname is assigned)
nickname = device['nickname']

# default nickname to host name if missing
if not nickname or nickname == 'None':
nickname = device['hostname']

if nickname:
self.__mac_to_nickname[mac] = nickname

Expand Down

0 comments on commit 53ea14e

Please sign in to comment.