mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 12:15:33 +01:00
[web_server] Minor python formatting (#6735)
This commit is contained in:
parent
921e56f2c6
commit
036a666e36
@ -35,19 +35,19 @@ WebServer = web_server_ns.class_("WebServer", cg.Component, cg.Controller)
|
|||||||
def default_url(config):
|
def default_url(config):
|
||||||
config = config.copy()
|
config = config.copy()
|
||||||
if config[CONF_VERSION] == 1:
|
if config[CONF_VERSION] == 1:
|
||||||
if not (CONF_CSS_URL in config):
|
if CONF_CSS_URL not in config:
|
||||||
config[CONF_CSS_URL] = "https://esphome.io/_static/webserver-v1.min.css"
|
config[CONF_CSS_URL] = "https://esphome.io/_static/webserver-v1.min.css"
|
||||||
if not (CONF_JS_URL in config):
|
if CONF_JS_URL not in config:
|
||||||
config[CONF_JS_URL] = "https://esphome.io/_static/webserver-v1.min.js"
|
config[CONF_JS_URL] = "https://esphome.io/_static/webserver-v1.min.js"
|
||||||
if config[CONF_VERSION] == 2:
|
if config[CONF_VERSION] == 2:
|
||||||
if not (CONF_CSS_URL in config):
|
if CONF_CSS_URL not in config:
|
||||||
config[CONF_CSS_URL] = ""
|
config[CONF_CSS_URL] = ""
|
||||||
if not (CONF_JS_URL in config):
|
if CONF_JS_URL not in config:
|
||||||
config[CONF_JS_URL] = "https://oi.esphome.io/v2/www.js"
|
config[CONF_JS_URL] = "https://oi.esphome.io/v2/www.js"
|
||||||
if config[CONF_VERSION] == 3:
|
if config[CONF_VERSION] == 3:
|
||||||
if not (CONF_CSS_URL in config):
|
if CONF_CSS_URL not in config:
|
||||||
config[CONF_CSS_URL] = ""
|
config[CONF_CSS_URL] = ""
|
||||||
if not (CONF_JS_URL in config):
|
if CONF_JS_URL not in config:
|
||||||
config[CONF_JS_URL] = "https://oi.esphome.io/v3/www.js"
|
config[CONF_JS_URL] = "https://oi.esphome.io/v3/www.js"
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user