1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-06 05:12:21 +01:00

Webserver - include css, js in index (#932)

* add new config options

* init variables in code

* load css and js in python

* update print inside webserver

* fix indentation

* fix indentation

* indentation fix

* fix condition in init

* use cv.file_ instead of cv.string

* do not import EsphomeError

* support embedding js and css at the same time as defined in url

* handle css as separate page

* handle js as separate page

* fix copy and paste error
This commit is contained in:
Elkropac
2020-02-20 13:05:10 +01:00
committed by GitHub
parent 4402a6eb4c
commit 67cbaabd99
4 changed files with 107 additions and 8 deletions

View File

@@ -103,6 +103,7 @@ CONF_COOL_ACTION = 'cool_action'
CONF_COUNT_MODE = 'count_mode'
CONF_CRON = 'cron'
CONF_CS_PIN = 'cs_pin'
CONF_CSS_INCLUDE = 'css_include'
CONF_CSS_URL = 'css_url'
CONF_CURRENT = 'current'
CONF_CURRENT_OPERATION = 'current_operation'
@@ -210,6 +211,7 @@ CONF_INVALID_COOLDOWN = 'invalid_cooldown'
CONF_INVERT = 'invert'
CONF_INVERTED = 'inverted'
CONF_IP_ADDRESS = 'ip_address'
CONF_JS_INCLUDE = 'js_include'
CONF_JS_URL = 'js_url'
CONF_JVC = 'jvc'
CONF_KEEP_ON_TIME = 'keep_on_time'