Fix key error

This commit is contained in:
Pascal Vizeli
2017-06-15 00:02:07 +02:00
parent da82dcc38c
commit 0af4be2e24

View File

@@ -267,7 +267,7 @@ def async_setup(hass, config):
extra_arg = {attr: service.data[attr] for attr in (
ATTR_VISIBLE, ATTR_ICON, ATTR_VIEW, ATTR_CONTROL
) if service.data[attr] is not None}
) if service.data.get(attr) is not None}
new_group = yield from Group.async_create_group(
hass, service.data.get(ATTR_NAME, object_id),