From c2b75140bf01b8c8e57a4a835f7cae017b15a939 Mon Sep 17 00:00:00 2001 From: "Teagan M. Glenn" Date: Thu, 18 Aug 2016 10:40:28 -0600 Subject: [PATCH] Fix config validation import to make things more readable --- homeassistant/components/sensor/wunderground.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/sensor/wunderground.py b/homeassistant/components/sensor/wunderground.py index c041d7ceaff..7d3084b47be 100644 --- a/homeassistant/components/sensor/wunderground.py +++ b/homeassistant/components/sensor/wunderground.py @@ -11,7 +11,7 @@ import requests import voluptuous as vol from homeassistant.helpers.entity import Entity -from homeassistant.helpers.config_validation import (ensure_list, string) +import homeassistant.helpers.config_validation as cv from homeassistant.util import Throttle from homeassistant.const import (CONF_PLATFORM, CONF_MONITORED_CONDITIONS, CONF_API_KEY, TEMP_FAHRENHEIT, TEMP_CELSIUS, @@ -57,10 +57,10 @@ SENSOR_TYPES = { PLATFORM_SCHEMA = vol.Schema({ vol.Required(CONF_PLATFORM): "wunderground", - vol.Required(CONF_API_KEY): string, - vol.Optional(CONF_PWS_ID): string, + vol.Required(CONF_API_KEY): cv.string, + vol.Optional(CONF_PWS_ID): cv.string, vol.Required(CONF_MONITORED_CONDITIONS, - default=[]): vol.All(ensure_list, [vol.In(SENSOR_TYPES)]), + default=[]): vol.All(cv.ensure_list, [vol.In(SENSOR_TYPES)]), })