mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-27 00:17:22 +02:00
Add Captive Portal (#624)
* WIP: Captive Portal * Updates * Updates * Lint * Fixes
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import esphome.config_validation as cv
|
||||
import esphome.codegen as cg
|
||||
from esphome.const import CONF_ID
|
||||
from esphome.core import coroutine_with_priority, CORE
|
||||
|
||||
DEPENDENCIES = ['network']
|
||||
|
||||
web_server_base_ns = cg.esphome_ns.namespace('web_server_base')
|
||||
WebServerBase = web_server_base_ns.class_('WebServerBase', cg.Component)
|
||||
|
||||
CONF_WEB_SERVER_BASE_ID = 'web_server_base_id'
|
||||
CONFIG_SCHEMA = cv.Schema({
|
||||
cv.GenerateID(): cv.declare_id(WebServerBase),
|
||||
})
|
||||
|
||||
|
||||
@coroutine_with_priority(65.0)
|
||||
def to_code(config):
|
||||
var = cg.new_Pvariable(config[CONF_ID])
|
||||
yield cg.register_component(var, config)
|
||||
|
||||
if CORE.is_esp32:
|
||||
cg.add_library('FS', None)
|
||||
cg.add_library('ESP Async WebServer', '1.1.1')
|
||||
Reference in New Issue
Block a user