Traceback (most recent call last):


 "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run

result = self.fn(*self.args, **self.kwargs)


 "/config/custom_components/alexa_media/alarm_control_panel.py", line 95, in _handle_event

self.refresh()


 "/usr/src/homeassistant/homeassistant/util/__init__.py", line 224, in wrapper

result = method(*args, **kwargs)


 "/usr/src/homeassistant/homeassistant/util/__init__.py", line 224, in wrapper

result = method(*args, **kwargs)


 "/config/custom_components/alexa_media/alarm_control_panel.py", line 106, in refresh

if state_json['deviceStates']:
TypeError: 'NoneType' object is not subscriptable

Traceback (most recent call last):


 "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform

SLOW_SETUP_MAX_WAIT, loop=hass.loop)


 "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for

return fut.result()


 "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run

result = self.fn(*self.args, **self.kwargs)


 "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/netatmo.py", line 80, in setup_platform

if module_name not in data.get_module_names():


 "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/netatmo.py", line 304, in get_module_names

self.update()


 "/usr/local/lib/python3.6/site-packages/homeassistant/components/sensor/netatmo.py", line 333, in update

for module in self.data:
TypeError: 'NoneType' object is not iterable
