Add sense guard clause (#22014)
This commit is contained in:
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()
|
||||
|
||||
Reference in new issue
Block a user