Add guard clause for discovery_info to tahoma platforms (#31434)

This commit is contained in:
Vincent Le Bourlot 2020-02-03 13:30:44 +01:00 committed by GitHub
parent e78378d90f
commit f49a392188
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 0 deletions

View file

@ -10,6 +10,8 @@ _LOGGER = logging.getLogger(__name__)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the Tahoma scenes."""
if discovery_info is None:
return
controller = hass.data[TAHOMA_DOMAIN]["controller"]
scenes = []
for scene in hass.data[TAHOMA_DOMAIN]["scenes"]: