1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-21 12:42:21 +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

@@ -1,7 +1,9 @@
import esphomeyaml.config_validation as cv
from esphomeyaml.components import binary_sensor
from esphomeyaml.const import CONF_ID, CONF_NAME
from esphomeyaml.helpers import App, Pvariable
from esphomeyaml.helpers import App, variable
DEPENDENCIES = ['mqtt']
PLATFORM_SCHEMA = binary_sensor.PLATFORM_SCHEMA.extend({
cv.GenerateID('status_binary_sensor'): cv.register_variable_id,
@@ -10,5 +12,10 @@ PLATFORM_SCHEMA = binary_sensor.PLATFORM_SCHEMA.extend({
def to_code(config):
rhs = App.make_status_binary_sensor(config[CONF_NAME])
gpio = Pvariable('binary_sensor::MQTTBinarySensorComponent', config[CONF_ID], rhs)
binary_sensor.setup_mqtt_binary_sensor(gpio.Pmqtt, config)
status = variable('Application::MakeStatusBinarySensor', config[CONF_ID], rhs)
binary_sensor.setup_binary_sensor(status.Pstatus, config)
binary_sensor.setup_mqtt_binary_sensor(status.Pmqtt, config)
def build_flags(config):
return '-DUSE_STATUS_BINARY_SENSOR'