mirror of
https://github.com/home-assistant/core.git
synced 2025-06-01 03:37:08 +00:00
catch TypeError's in addition to ValueError's for unifi direct device tracker (#19994)
* catch TypeError's in addition to ValueError's in response from unifi access point sometimes unifi's access point returns incomplete json which results in a TypeError because ssid_table is None * fix syntax error
This commit is contained in:
parent
418fa226e6
commit
2208563de4
@ -131,6 +131,6 @@ def _response_to_json(response):
|
||||
active_clients[client.get("mac")] = client
|
||||
|
||||
return active_clients
|
||||
except ValueError:
|
||||
except (ValueError, TypeError):
|
||||
_LOGGER.error("Failed to decode response from AP.")
|
||||
return {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user