From f505b2853b8b39a1a29d4f0f91a2ad65dcb44a7e Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Mon, 29 Oct 2018 11:01:28 +0100 Subject: [PATCH] Add 0.81 ID Lovelace FAQ (#7152) * Add 0.81 ID FAQ Explain why ID's are added to ui-lovelace.yaml will also change documentation * Add id to config example * Update index.markdown * Change include statement * Fix typo * :pencil2: Tweaks * :pencil2: Tweaks --- source/lovelace/index.markdown | 14 ++++++++++++-- source/lovelace/tips.markdown | 8 +++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/source/lovelace/index.markdown b/source/lovelace/index.markdown index 551269287e7..e48aa75e1ff 100644 --- a/source/lovelace/index.markdown +++ b/source/lovelace/index.markdown @@ -65,7 +65,7 @@ excluded_entities: views: # View tab title. - title: Example - # Optional unique id for direct access /lovelace/${id} + # Unique id for direct access /lovelace/${id}. If you don't specify one, it is added automatically. id: example # Optional background (overwrites the global background). background: radial-gradient(crimson, skyblue) @@ -74,7 +74,8 @@ views: # The cards to show on this view. cards: # The filter card will filter entities for their state - - type: entity-filter + - id: peoplehome # Every card needs an ID, if you don't specify one, it is added automatically. + type: entity-filter entities: - device_tracker.paulus - device_tracker.anne_there @@ -116,6 +117,9 @@ views: Now restart Home Assistant, navigate to `/lovelace`. When you make changes to `ui-lovelace.yaml`, you don't have to restart Home Assistant or refresh the page. Just hit the refresh button at the top of the UI. +## {% linkable_title IDs for cards and views %} +Every card and view needs an ID, this is used to edit your config from the UI. If you don't specify an ID, Home Assistant will add one. If you don't want Home Assistant to write to your `ui-lovelace.yaml` file, make sure every view and card have an ID. + ## {% linkable_title Setting Lovelace as the Default UI %} Once you are ready to start using Lovelace UI as your main user interface, click on info, the "i" icon under 'Developer Tools" in the Home Assistant side-bar. Next, locate >>Set Lovelace as default page on this device<< under the Home Assistant version information and click it. @@ -151,3 +155,9 @@ frontend: Given examples refer to `/local/example_image.jpg`. That means you should have `www` directory next to your HA `configuration.yaml`. An image kept in `HA_configuration_dir/www/example_image.jpg` will be shown after refreshing Lovelace page. Restart Home Assistant after creating the `www` directory. Otherwise, HA will not know that you created this directory. + +### {% linkable_title My `ui-lovelace.yaml` file suddenly has ID's added to all cards and views! %} + +Since version 0.81 we started preparing for the ability to edit you Lovelace UI from the UI itself. To be able to do this every view and card should have a unique ID. If your cards or views do not have an ID, Home Assistant will add a random one. You can edit the ID, the only restriction is that it is unique. + +If you don't want Home Assistant to write to your `ui-lovelace.yaml` file, make sure all your views and cards have an ID, then Home Assistant will not touch your file. diff --git a/source/lovelace/tips.markdown b/source/lovelace/tips.markdown index 2c8ef8cdfe8..aed61412045 100644 --- a/source/lovelace/tips.markdown +++ b/source/lovelace/tips.markdown @@ -36,9 +36,11 @@ you with the ability to split your Lovelace configuration into multiple files. The [Lovelace Jinja2 Script][lovelace-jinja] by [@skalavala] is a simple Jinja2 script that you run in the template editor to generate lovelace configuration based on the entities that are already setup.

- Split configuration is no longer possible directly in Lovelace, - due to fact that Home Assistant writes directly to the `ui-lovelace.yaml` file. - Use one of the above generators if you would like to contintue to have such functionality. + Split configuration is no longer possible in Lovelace since version 0.81, due to the fact that Home Assistant + will be writing directly to the `ui-lovelace.yaml` file. + + If you want to split your configuration you can use one of the tools listed above, but edits done with the UI will + be overwritten by those tools, so you should not use both.

## {% linkable_title Tips and Tricks %}