Frontend: deprecate `extra_html_url` (#37843)

pull/37862/head
Bram Kragten 2020-07-14 21:06:36 +02:00 committed by GitHub
parent c3f63e0739
commit ea17d36cbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 17 deletions

View File

@ -84,23 +84,29 @@ _LOGGER = logging.getLogger(__name__)
CONFIG_SCHEMA = vol.Schema( CONFIG_SCHEMA = vol.Schema(
{ {
DOMAIN: vol.Schema( DOMAIN: vol.All(
{ cv.deprecated(CONF_EXTRA_HTML_URL, invalidation_version="0.115"),
vol.Optional(CONF_FRONTEND_REPO): cv.isdir, cv.deprecated(CONF_EXTRA_HTML_URL_ES5, invalidation_version="0.115"),
vol.Optional(CONF_THEMES): vol.Schema( vol.Schema(
{cv.string: {cv.string: cv.string}} {
), vol.Optional(CONF_FRONTEND_REPO): cv.isdir,
vol.Optional(CONF_EXTRA_HTML_URL): vol.All(cv.ensure_list, [cv.string]), vol.Optional(CONF_THEMES): vol.Schema(
vol.Optional(CONF_EXTRA_MODULE_URL): vol.All( {cv.string: {cv.string: cv.string}}
cv.ensure_list, [cv.string] ),
), vol.Optional(CONF_EXTRA_HTML_URL): vol.All(
vol.Optional(CONF_EXTRA_JS_URL_ES5): vol.All( cv.ensure_list, [cv.string]
cv.ensure_list, [cv.string] ),
), vol.Optional(CONF_EXTRA_MODULE_URL): vol.All(
# We no longer use these options. cv.ensure_list, [cv.string]
vol.Optional(CONF_EXTRA_HTML_URL_ES5): cv.match_all, ),
vol.Optional(CONF_JS_VERSION): cv.match_all, vol.Optional(CONF_EXTRA_JS_URL_ES5): vol.All(
} cv.ensure_list, [cv.string]
),
# We no longer use these options.
vol.Optional(CONF_EXTRA_HTML_URL_ES5): cv.match_all,
vol.Optional(CONF_JS_VERSION): cv.match_all,
},
),
) )
}, },
extra=vol.ALLOW_EXTRA, extra=vol.ALLOW_EXTRA,

View File

@ -50,6 +50,7 @@ CONFIG_SCHEMA = vol.Schema(
cv.ensure_list, cv.ensure_list,
[ [
vol.All( vol.All(
cv.deprecated(CONF_WEBCOMPONENT_PATH, invalidation_version="0.115"),
vol.Schema( vol.Schema(
{ {
vol.Required(CONF_COMPONENT_NAME): cv.string, vol.Required(CONF_COMPONENT_NAME): cv.string,