1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-04 12:22:20 +01:00

Web server (#7)

* Web Server

* Preparations for 1.3

* Fixes

* Fix Lint
This commit is contained in:
Otto Winter
2018-04-18 18:43:13 +02:00
committed by GitHub
parent ac5ab33975
commit 3540b3fbb0
53 changed files with 754 additions and 313 deletions

View File

@@ -25,11 +25,16 @@ PLATFORM_SCHEMA = sensor.PLATFORM_SCHEMA.extend({
def to_code(config):
rhs = App.make_adc_sensor(config[CONF_PIN], config[CONF_NAME],
rhs = App.make_adc_sensor(config[CONF_NAME], config[CONF_PIN],
config.get(CONF_UPDATE_INTERVAL))
make = variable('Application::MakeADCSensor', config[CONF_ID], rhs)
adc = make.Padc
if CONF_ATTENUATION in config:
attenuation = ATTENUATION_MODES[config[CONF_ATTENUATION]]
add(adc.set_attenuation(RawExpression(attenuation)))
sensor.setup_sensor(adc, config)
sensor.setup_mqtt_sensor_component(make.Pmqtt, config)
def build_flags(config):
return '-DUSE_ADC_SENSOR'