mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 13:15:18 +02:00
Fix 3621 (#3642)
Happens when the scanner searches for a mac address, that has been forgotten by the fritzbox.
This commit is contained in:
@@ -85,7 +85,9 @@ class FritzBoxScanner(object):
|
||||
|
||||
def get_device_name(self, mac):
|
||||
"""Return the name of the given device or None if is not known."""
|
||||
ret = self.fritz_box.get_specific_host_entry(mac)['NewHostName']
|
||||
ret = self.fritz_box.get_specific_host_entry(mac).get(
|
||||
'NewHostName'
|
||||
)
|
||||
if ret == {}:
|
||||
return None
|
||||
return ret
|
||||
|
Reference in New Issue
Block a user