After using this card for a while, I decided it was a bit too hacky for my taste and it made formatting a card layout a nightmare. I took the concept and merged it with ideas from compact-custom-header to make their lovechild that you see here today.
This module allows you to update your lovelace background with animated backgrounds based on an entity’s state. If you don’t want to update based on an entity’s state you can just set default_url for an unchanging animated background.
All instructions for installation can be found in the repository, though I recommend installing it through HACS so you stay up to date with bug fixes and feature updates.
A huge thanks to both CCH and VideoBackground-Card for the inspiration (and in some cases blatant theft of their code)
Anyone have hints for the cleanest way to load a local .mp4 file (in my case, www/backgrounds/matrix.mp4)? I tried the most obvious method below, but Chrome Developer tool console says 404 Not Found when I replace the remote URL src with a local path.
Really beautiful card. I belieave we all spend quite a bit of time looking at this screen and your background just makes it much, much better.
Thank you.
Unfortunately doesn’t seem to work either. Does that work for you?
Separately, when using an external URL to pull the mp4 (like for the night image included in the package), it looks like the html file is repeatedly reloaded, causing browser memory to continuously rise and cpu to peg, making the interface mostly unusable.
Card background transparency in the example image is being set with the theme. You can also use other lovelace plugins to change the transparency of individual cards (such as card-mod https://github.com/thomasloven/lovelace-card-mod)
Unable to make it work. In FF console i see these errors:
Loading module from “http://192.168.1.204:8123/community/lovelace-animated-background/animated-background.js” was blocked because of a disallowed MIME type (“text/plain”).
default_view
Loading failed for the module with source “http://192.168.1.204:8123/community/lovelace-animated-background/animated-background.js”. default_view:1:1
uncaught exception: http://192.168.1.204:8123/community/lovelace-animated-background/animated-background.js
This looks really cool, however I have a question. Would this work with static images? Because you have built exactly what I was looking for but I need it for static wallpapers.
Anyways this is really cool and I might use this in the future.
I know, but this will not allow me to switch background on a single theme and I will either have to hardcode the images into the theme or into lovelace.
What I wish to do is to use an input_select to select a wallpaper. This way I will need a single theme. I already have this for my border radius and it works really great. Anyways thanks for replying.
and disabled the script part. The file.mp4 is at www/background-animations.
@ Villhellm
I have a question and hope you can help me. The videos are looking great on my full hd screen but on my iPad mini its zoomed in. Is it possible to also see the full video on small devices and big screens?
Thanks in advance.