From 4c690eace8707d4b0330739474679ec27fda6066 Mon Sep 17 00:00:00 2001 From: LeoCal <25389602+LeoCal@users.noreply.github.com> Date: Fri, 15 Nov 2019 10:52:15 +0100 Subject: [PATCH] Fix Swisscom empty response received (#28782) --- homeassistant/components/swisscom/device_tracker.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/homeassistant/components/swisscom/device_tracker.py b/homeassistant/components/swisscom/device_tracker.py index adb018a4b4b..5662212c9e8 100644 --- a/homeassistant/components/swisscom/device_tracker.py +++ b/homeassistant/components/swisscom/device_tracker.py @@ -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"]] = {