mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 17:05:21 +01:00
vol.Schema -> cv.Schema
This commit is contained in:
parent
a99f99779a
commit
289acade1e
4 changed files with 5 additions and 5 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue