Update invocation of WUndergroundData

This commit is contained in:
Teagan M. Glenn 2016-08-17 22:29:00 -06:00
parent 563154c3c2
commit 62b00e1294

View File

@ -62,13 +62,12 @@ PLATFORM_SCHEMA = vol.Schema({
def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the Wunderground sensor."""
rest = WUndergroundData(_RESOURCE,
config.get(CONF_PWS_ID),
if not PLATFORM_SCHEMA(config):
return False
rest = WUndergroundData(hass,
config.get(CONF_API_KEY),
payload)
config.get(CONF_PWS_ID, None))
sensors = []
for variable in config['monitored_conditions']:
if variable in SENSOR_TYPES: