Fix bloomsky platform discovery (#3303)

This commit is contained in:
Paulus Schoutsen 2016-09-10 09:12:24 -07:00 committed by GitHub
parent 54a17f5d98
commit b8251b084a
2 changed files with 4 additions and 2 deletions

View file

@ -33,7 +33,8 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the available BloomSky weather binary sensors."""
bloomsky = get_component('bloomsky')
sensors = config.get(CONF_MONITORED_CONDITIONS)
# Default needed in case of discovery
sensors = config.get(CONF_MONITORED_CONDITIONS, SENSOR_TYPES)
for device in bloomsky.BLOOMSKY.devices.values():
for variable in sensors:

View file

@ -46,7 +46,8 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the available BloomSky weather sensors."""
bloomsky = get_component('bloomsky')
sensors = config.get(CONF_MONITORED_CONDITIONS)
# Default needed in case of discovery
sensors = config.get(CONF_MONITORED_CONDITIONS, SENSOR_TYPES)
for device in bloomsky.BLOOMSKY.devices.values():
for variable in sensors: