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

+2
View File
@@ -48,6 +48,8 @@ SENSOR_VARIANTS = [PRODUCTION_NAME.lower(), CONSUMPTION_NAME.lower()]
async def async_setup_platform(hass, config, async_add_entities,
discovery_info=None):
"""Set up the Sense sensor."""
if discovery_info is None:
return
data = hass.data[SENSE_DATA]
@Throttle(MIN_TIME_BETWEEN_DAILY_UPDATES)