Allow managing Lovelace storage dashboards (#32241)
* Allow managing Lovelace storage dashboards * Make sure we do not allow duplicate url paths * Allow setting sidebar to None * Fix tests * Delete storage file on delete * List all dashboards
This commit is contained in:
1 parent
ede39454a2
commit
deda2f86e7
11 files changed
+447
-90
No files matched your search
@@ -171,6 +171,8 @@ def async_register_built_in_panel(
|
||||
frontend_url_path=None,
|
||||
config=None,
|
||||
require_admin=False,
|
||||
*,
|
||||
update=False,
|
||||
):
|
||||
"""Register a built-in panel."""
|
||||
panel = Panel(
|
||||
@@ -184,7 +186,7 @@ def async_register_built_in_panel(
|
||||
|
||||
panels = hass.data.setdefault(DATA_PANELS, {})
|
||||
|
||||
if panel.frontend_url_path in panels:
|
||||
if not update and panel.frontend_url_path in panels:
|
||||
raise ValueError(f"Overwriting panel {panel.frontend_url_path}")
|
||||
|
||||
panels[panel.frontend_url_path] = panel
|
||||
|
||||
Reference in new issue
Block a user