diff --git a/esphome/components/api.py b/esphome/components/api.py index 7a6d61d6a6..86e77bb4c6 100644 --- a/esphome/components/api.py +++ b/esphome/components/api.py @@ -131,7 +131,7 @@ def homeassistant_service_to_code(config, action_id, template_arg, args): CONF_API_CONNECTED = 'api.connected' -API_CONNECTED_CONDITION_SCHEMA = vol.Schema({}) +API_CONNECTED_CONDITION_SCHEMA = cv.Schema({}) @CONDITION_REGISTRY.register(CONF_API_CONNECTED, API_CONNECTED_CONDITION_SCHEMA) diff --git a/esphome/components/mqtt.py b/esphome/components/mqtt.py index aa0537913d..cf309eab10 100644 --- a/esphome/components/mqtt.py +++ b/esphome/components/mqtt.py @@ -350,7 +350,7 @@ LIB_DEPS = 'AsyncMqttClient@0.8.2' BUILD_FLAGS = '-DUSE_MQTT' CONF_MQTT_CONNECTED = 'mqtt.connected' -MQTT_CONNECTED_CONDITION_SCHEMA = vol.Schema({}) +MQTT_CONNECTED_CONDITION_SCHEMA = cv.Schema({}) @CONDITION_REGISTRY.register(CONF_MQTT_CONNECTED, MQTT_CONNECTED_CONDITION_SCHEMA) diff --git a/esphome/components/sensor/__init__.py b/esphome/components/sensor/__init__.py index 24e9c17a8b..297ed1177f 100644 --- a/esphome/components/sensor/__init__.py +++ b/esphome/components/sensor/__init__.py @@ -46,7 +46,7 @@ FILTER_KEYS = [CONF_OFFSET, CONF_MULTIPLY, CONF_FILTER_OUT, def validate_datapoint(value): if isinstance(value, dict): - return vol.Schema({ + return cv.Schema({ vol.Required(CONF_FROM): cv.float_, vol.Required(CONF_TO): cv.float_, })(value) @@ -67,7 +67,7 @@ FILTERS_SCHEMA = cv.ensure_list({ vol.Optional(CONF_FILTER_OUT): cv.float_, vol.Optional('filter_nan'): cv.invalid("The filter_nan filter has been removed. Please use " "'filter_out: nan' instead"), - vol.Optional(CONF_SLIDING_WINDOW_MOVING_AVERAGE): vol.All(vol.Schema({ + vol.Optional(CONF_SLIDING_WINDOW_MOVING_AVERAGE): vol.All(cv.Schema({ vol.Optional(CONF_WINDOW_SIZE, default=15): cv.positive_not_null_int, vol.Optional(CONF_SEND_EVERY, default=15): cv.positive_not_null_int, vol.Optional(CONF_SEND_FIRST_AT): cv.positive_not_null_int, diff --git a/esphome/components/wifi.py b/esphome/components/wifi.py index 867cc9a815..e9932d06ea 100644 --- a/esphome/components/wifi.py +++ b/esphome/components/wifi.py @@ -193,7 +193,7 @@ def lib_deps(config): CONF_WIFI_CONNECTED = 'wifi.connected' -WIFI_CONNECTED_CONDITION_SCHEMA = vol.Schema({}) +WIFI_CONNECTED_CONDITION_SCHEMA = cv.Schema({}) @CONDITION_REGISTRY.register(CONF_WIFI_CONNECTED, WIFI_CONNECTED_CONDITION_SCHEMA)