-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WARNING: 2023.4.0b0 or newer break Animated Background #56
Comments
I found a few lil things:
It even tries to load the background, but something in there causes it to endless loop. It has problems reading View_Layout.style.background as View_Layout is null now. I hacked around it a bit and now it works fine...
THIS IS A UGLY HACK. I CAN'T FIX IT ANY BETTER. Maybe someone else has interest in it. |
Another day, another broken background video... Edited Line 59 above to fit in the newest shoes for >=2023.4.0b4... |
Hopefully someone can have a look. Spent a lot of time a few weeks ago getting this to work exactly as I wanted, stood back to admire and them boom, 2023.4!!!! Don't have the expertise to even know where to begin, so hoping someone does. Tried replacing the lines of code with yours @dreimer1986 but still dead. 😔 |
yes , can someone help out on this please !!! |
confirmed broken 2023.4 |
That's the problem. He died.... |
Btw, I used CardMod, too to get my stuff woking as I want it to. Maybe this is your problem? It's quite broken atm either. I fixed most parts by now except the sidebar. Maybe the styles.js I made with some help and some tinkering helps you all out? https://raw.githubusercontent.com/dreimer1986/yourname_card_mod/master/www/styles.js Here the discussion I opened a few minutes ago. |
Btw. I went on and uploaded my "fix" here. |
might be worth forking / fixing. HACS has been notified of this addon being broken and wont be fixed. |
@dreimer1986 , i changed my code to yours , and still not working , do i need to do anything else ?? |
Likely the removal of the default wallpaper is broken. I just "fixed" the fatal errors in my code. Rest is quite above my skills. |
Well i disabled animated wallpaper , and added a static picture , if anyone forks this and fixes it please let us know , it was awesome , i would love do contribute to have it back |
Such a shame. I enjoyed my animated backgrounds. Was humbled to hear the author had passed away. Thanks for the excellent addon. |
Did anyone try to add my styles.js to the Dashboard resources as workaround? As I said... It works for me that way. ONLY my transparent sidebar does not, but this never worked out of the box with this addon. This is my current state. Settings → Dashboards → Three dots → Resources → Add it there. Mine for example is in www folder, thus you write "/local/styles.js" there. It's a Java Script module, NOT a style sheet! |
Mine will not help you much. I just use random backgrounds:
|
@dreimer1986 ok , i think after all cleaned up it started to work with your styles.js , I hope someone continues this , but thank you for the fix at least Thank you |
Got it working with your fix. Thanks! |
this did not work for me. |
Read the report COMPLETELY and try ALL steps needed. You missed exactly one. Otherwise it would sort of work again. IMO reading these less than 20 messages in here (One with a step by step manual for the missing step) is no massive task I can not ask you to do first. Don't you agree? |
I appologize, i was mistaken, your post (which i quoted), only linked to a single .js file. and says IS the "fix" my bad for assuming though. im still not clear on the "steps" |
It worked for me, although I named it something other than styles.js. I can see that confusing me somewhere down the line. Anyway, thank you very much for the fix. Hopefully future updates don't break it. |
I added your styles.js to resources. This ended up in a complete fix only on the iOs app. On android it didn't do anything and in the Chrome browser the background showed up only in the upper line in one of my themes only, called 'Transparent', but not in the 'Yourname' theme that I was always using. If I choose the default theme, nothing shows up.
|
First regarding the Android does not work problem. (@Opontios)
Regarding the weather part. I never wanted the weather to affect my background, I wanted a random one. That's why I skipped the complete entity selection. So yes, no entity and thus no influence of weather. But in theory this still should work. Regarding which file to use... Errr, you need both. Let me explain. (@Opontios @TRusselo) https://raw.githubusercontent.com/dreimer1986/yourname_card_mod/master/www/styles.js is the file fixing the stuff I am skill wise unable to fix in the code of the addon itself. It's a Java Script file editing the CSS of your HA page. What to do with this one is explained here: #56 (comment) Phew, I hope I did not miss anyone ^^ Ah and before I forget... @TRusselo you still took it personal. Meeeeh ^^ Sry for that |
Thanks for your efforts on the hackfix @dreimer1986. As you say, it's not meant to be perfect but at least it gets partial working back again! Happy here in Australia! Viel Grüße an Bayern |
Ok, this is how I got this new file to work for me even though I just modified the original HACS installed file but that would still not work. 1, Install animated-background by copying the new 2, Go to resources - three dots top right of your main page , Edit Dashboard , three dots , Manage resources. Search for and remove any old animated background resources then add the URL 3, Ctrl & F5 to clear your browser cache and the Animated Wallpapers should restore. In the App you may need to clear the front end cache but a pulldown refresh worked for me. |
WHAT?! See? ... That I meant with Browser cache is evil! I have no way right now to verify, but as I already witnessed evil things thanks to Cache I believe in your words. |
Thanks for this. |
@dreimer1986 thanks for the forking and fixing this! I removed the original lovelace-animated-background repo, added a custom repo pointing to https://github.com/dreimer1986/lovelace-animated-background/, installed it, and reloaded the dashboard. Everything works! Tested on Firefox on macOS, native app on Android, and Fully Kiosk Browser on Android. No cache issues encountered with that approach. I wonder if the gzip'd version of the js file is still being fetched if people aren't first removing the whole thing? It might be useful to add the info regarding removing the old one and adding your repo as a custom HACS repo to your first post at this point :) |
Still I fell for the stupid Cache as it seems... Looks like the CSS modding is not needed indeed. I don't get it, I wiped the Cache, changed all kind of stuff, did dozens of Beta Updates of HA and this stupid Cache kept this ONE ADDON?! As I just forked to show what I did to make it run again in this report here, I never even tried to switch to my own repo tbh. This really seems to force a reset of one specific part of the Cache. I removed my CSS tinkering and it does a nice job. Still no way for me to get the sidebar transparent, but this is another story as the addin NEVER had this feature and I always had to use some CSS hacking ^^ But beware: I do not plan to maintain the repo, I had LUCK to get it working at all again. This is far beyond my skills with all the CSS shadow root madness used by HA. |
@dreimer1986 |
we thank you @dreimer1986 for all your help , we understand , its beyond my skils also, otherwise i would take it , hope someone can keep it going that has the jedi skils for this project !! |
I send u pull request. |
Thank @dreimer1986 for you fix, I just added "margin-bottom: -5px" to the ".bg-video" class, to make the vertical bar disappear |
A big thank you to all of you who have considerably more knowledge than me and got this all working again. I know not what magic you used, but magic it was indeed. 😂 |
If someone has some magic for me, I would be very happy... Before the new update I was able to get my sidebar transparent and the video showed as background... Not anymore. Looks a bit like the sidebar is now somehow shrinking the size to draw on... https://community.home-assistant.io/t/a-different-take-on-designing-a-lovelace-ui/162594/4798?u=daniel_reimer My red result proving that is seen a bit down below... |
Soo, I was a bit crazy and mad yesterday. I updated my JS script to replace the addin for me. The addin was not deep enough in the tree of shadow roots to touch the sidebar anymore after 2023.04. So I went all the way down to "body" and attached my hackery there. The main idea came from the addin source except I don't use a iFrame for it, but a normal node. Likely it's ONLY a solution for my needs though... Playing video as background works fine even with a rudimentary randomizer, but no weather dependency and no other trickery. Main idea is to set the theme background to transparent and you are where you have to be. |
Just to let you know about the recent stuff. I started a weather feature and it seems to work mostly fine already. It has one contra though. You need a long term token in HA to use it. I only found one way to get a entity state where the script runs and that's the exit/entrance aka the external API. Working with it is no big problem though and the positive aspects of this approach are just worth it IMO. Otherwise... it's a bit different to configure AND needs help by the theme. I made some differences on mine recently to get anything in a perfect shape. This work needs to be done for your themes, too. Lil howto will follow though. Where to set what to transparent or switching from rgb to rgba etcetc. End result will be almost 100% of HA has a animated background then. Only two places are bad... HACS and the Add-on Manager. Both use iFrames and thus are behaving strange. Aufzeichnung.2023-04-15.203345.mp4P.S. Yes, this is the SETTINGS menu! P.P.S. Work on themes sounds like big work, but it's just a few things need a change. Most important... background image will be set to transparent. Well... A obvious one ^^ That way I did not have a single video load error or flashing through original background etcetc at all since I started polishing up my new solution. |
I am done. Whenever you feel like you wanna tinker around, https://github.com/dreimer1986/yourname_card_mod/blob/master/README-script.md. Ah even if you plan to keep your addon, I roamed around flixel.com quite a bit to get a few more weather conditions filled. Feel free to use the new entries on your addin, too. Only hail and exceptional are missing now. |
I can confirm this worked for me too. Thanks @dreimer1986 |
@dreimer1986 Your fix works like a charm. Danke dir! 👍 |
Adding fix listed in Villhellm#56
As many things on the WebUI were overhauled completely and more will come with future versions most of the paths the addin docks onto are not on the former locations anymore. Thus the whole addin is DEAD. Maybe someone who already forked it and did some tinkering wants to look into that?
The text was updated successfully, but these errors were encountered: