mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 05:24:53 +01:00
[web_server] Minor python formatting (#6735)
This commit is contained in:
parent
921e56f2c6
commit
036a666e36
1 changed files with 6 additions and 6 deletions
|
@ -35,19 +35,19 @@ WebServer = web_server_ns.class_("WebServer", cg.Component, cg.Controller)
|
|||
def default_url(config):
|
||||
config = config.copy()
|
||||
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"
|
||||
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"
|
||||
if config[CONF_VERSION] == 2:
|
||||
if not (CONF_CSS_URL in config):
|
||||
if CONF_CSS_URL not in config:
|
||||
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"
|
||||
if config[CONF_VERSION] == 3:
|
||||
if not (CONF_CSS_URL in config):
|
||||
if CONF_CSS_URL not in config:
|
||||
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"
|
||||
return config
|
||||
|
||||
|
|
Loading…
Reference in a new issue