Fix Swisscom empty response received (#28782)

pull/28793/head
LeoCal 2019-11-15 10:52:15 +01:00 committed by Martin Hjelmare
parent 60e7440ec1
commit 4c690eace8
1 changed files with 4 additions and 0 deletions

View File

@ -92,6 +92,10 @@ class SwisscomDeviceScanner(DeviceScanner):
_LOGGER.info("No response from Swisscom Internet Box")
return devices
if "status" not in request.json():
_LOGGER.info("No status in response from Swisscom Internet Box")
return devices
for device in request.json()["status"]:
try:
devices[device["Key"]] = {