1
mirror of https://github.com/home-assistant/core synced 2024-07-30 21:18:57 +02:00

Allow loading Lovelace dashboards not only from root (#37561)

This commit is contained in:
Denys Dovhan 2020-08-31 11:51:03 +03:00 committed by GitHub
parent 97e1be98df
commit 00eb23b43f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,7 @@ from homeassistant.helpers import collection, config_validation as cv
from homeassistant.helpers.service import async_register_admin_service
from homeassistant.helpers.typing import ConfigType, HomeAssistantType, ServiceCallType
from homeassistant.loader import async_get_integration
from homeassistant.util import sanitize_filename
from homeassistant.util import sanitize_path
from . import dashboard, resources, websocket
from .const import (
@ -46,7 +46,7 @@ YAML_DASHBOARD_SCHEMA = vol.Schema(
{
**DASHBOARD_BASE_CREATE_FIELDS,
vol.Required(CONF_MODE): MODE_YAML,
vol.Required(CONF_FILENAME): vol.All(cv.string, sanitize_filename),
vol.Required(CONF_FILENAME): vol.All(cv.string, sanitize_path),
}
)