Add sense guard clause (#22014)

This commit is contained in:
kbickar authored and Martin Hjelmare committed 2019-03-14 11:46:44 +01:00
1 parent 6381242eca
commit abf2e763b1
3 files changed
+6 -2

No files matched your search

@@ -52,6 +52,8 @@ MDI_ICONS = {
async def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
"""Set up the Sense binary sensor."""
if discovery_info is None:
return
data = hass.data[SENSE_DATA]
sense_devices = await data.get_discovered_device_data()