A lovely screensaver for your Home Assistant setup, using images from Unsplash. Perfect for a allways on home panel diplay!
-
You will need a Access Key from Unsplash for this plugin to work
-
Head over to Unsplash registration page and fill out the form
-
After you have registered and confirmed your email head over to your apps page and click "New Application". Read and accept all the terms. Give your new app a name (lovelace-screensaver), a description (small script using unsplash images as a screensaver on home assistant) and click "Create application"
-
On the next page you will see your "Access Key". Add this to your
secrets.yaml
. Don't have asecrets.yaml
??? You should! read about it here: home-assistant.io/docs/configuration/secrets
-
-
Your now ready to add the script to your system
-
Go copy
dist/lovelace-screensaver.js
towww/custom-lovelace/lovelace-screensaver/
-
And lastly you need to add the following lines of code to your
ui-lovelace.yaml
-
resources:
- url: /local/custom-lovelace/lovelace-screensaver/lovelace-screensaver.js
type: js
screensaver:
unsplash_access_key: !secret unsplash_access_key
Configuration of this plugin is done via your ui-lovelace.yaml
in the property screensaver
you created in the installation:
property | description | default |
---|---|---|
unsplash_access_key | !required see installation guide to get your key | |
query | search terms for the type of images you want | nature |
idle_time | the time in minutes you want the screensaver to wait before starting | 5 |
orientation | possible values: portrait or landscape | landscape |
timeout | the time in milliseconds an image is displayed 1 | 30000 |
Example:
screensaver:
unsplash_access_key: !secret unsplash_access_key
query: animals
orientation: landscape
idle_time: 5
To build the index.js use:
yarn rollup -c rollup.config.js
Footnotes
-
Make sure you are not exceeding the maximum amount of request for a Demo account (50 requests per hour). ↩