mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 05:24:53 +01:00
Remove unnecessary update_interval from schemas
This commit is contained in:
parent
2712c44004
commit
b2e6d222cd
2 changed files with 2 additions and 4 deletions
|
@ -3,7 +3,7 @@ import esphome.config_validation as cv
|
|||
from esphome import pins
|
||||
from esphome.components import sensor
|
||||
from esphome.const import CONF_HUMIDITY, CONF_ID, CONF_MODEL, CONF_PIN, CONF_TEMPERATURE, \
|
||||
CONF_UPDATE_INTERVAL, ICON_THERMOMETER, UNIT_CELSIUS, ICON_WATER_PERCENT, UNIT_PERCENT
|
||||
ICON_THERMOMETER, UNIT_CELSIUS, ICON_WATER_PERCENT, UNIT_PERCENT
|
||||
from esphome.cpp_helpers import gpio_pin_expression
|
||||
|
||||
dht_ns = cg.esphome_ns.namespace('dht')
|
||||
|
@ -24,7 +24,6 @@ CONFIG_SCHEMA = cv.Schema({
|
|||
cv.Optional(CONF_TEMPERATURE): sensor.sensor_schema(UNIT_CELSIUS, ICON_THERMOMETER, 1),
|
||||
cv.Optional(CONF_HUMIDITY): sensor.sensor_schema(UNIT_PERCENT, ICON_WATER_PERCENT, 0),
|
||||
cv.Optional(CONF_MODEL, default='auto detect'): cv.enum(DHT_MODELS, upper=True, space='_'),
|
||||
cv.Optional(CONF_UPDATE_INTERVAL, default='60s'): cv.update_interval,
|
||||
}).extend(cv.polling_component_schema('60s'))
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import esphome.config_validation as cv
|
|||
from esphome import pins
|
||||
from esphome.components import sensor
|
||||
from esphome.const import CONF_COUNT_MODE, CONF_FALLING_EDGE, CONF_ID, CONF_INTERNAL_FILTER, \
|
||||
CONF_PIN, CONF_RISING_EDGE, CONF_UPDATE_INTERVAL, CONF_NUMBER, \
|
||||
CONF_PIN, CONF_RISING_EDGE, CONF_NUMBER, \
|
||||
ICON_PULSE, UNIT_PULSES_PER_MINUTE
|
||||
from esphome.core import CORE
|
||||
|
||||
|
@ -49,7 +49,6 @@ CONFIG_SCHEMA = sensor.sensor_schema(UNIT_PULSES_PER_MINUTE, ICON_PULSE, 2).exte
|
|||
cv.Required(CONF_FALLING_EDGE): COUNT_MODE_SCHEMA,
|
||||
}),
|
||||
cv.Optional(CONF_INTERNAL_FILTER, default='13us'): validate_internal_filter,
|
||||
cv.Optional(CONF_UPDATE_INTERVAL, default='60s'): cv.update_interval,
|
||||
}).extend(cv.polling_component_schema('60s'))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue