From 91dfff7cff0a85fd1b06b78f4fead86b6954eb81 Mon Sep 17 00:00:00 2001 From: c727 Date: Tue, 24 Jul 2018 23:24:49 +0200 Subject: [PATCH] Lovelace: Add resources to config file (#5877) --- source/lovelace/index.markdown | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/lovelace/index.markdown b/source/lovelace/index.markdown index 6f2862b8ad0..2d10ef96947 100644 --- a/source/lovelace/index.markdown +++ b/source/lovelace/index.markdown @@ -45,6 +45,13 @@ Create a new file `/ui-lovelace.yaml` and add the following content. Adj ```yaml title: My Awesome Home +# Include external resources +resources: + - url: /local/my-custom-card.js + type: js + - url: /local/my-webfont.css + type: css + # Optional background for all views. Check https://developer.mozilla.org/en-US/docs/Web/CSS/background for more examples. background: center / cover no-repeat url("/background.png") fixed # Exclude entities from "Unused entities" view @@ -120,6 +127,6 @@ This is probably because your version of Firefox doesn't have custom components ### Custom components don't load on my IOS device? -This is because for IOS devices by default javascript served is `es5`. You can allow custom components to load by forcing `javascript_version: latest` in your `configuration.yaml` under `frontend:`. +This is because for IOS devices by default javascript served is `es5`. You can allow custom components to load by forcing `javascript_version: latest` in your `configuration.yaml` under `frontend:`. > Note: Enabling `latest` on IOS could cause automation and script editor to crash.