Closed SeLLeRoNe closed 4 years ago
Can you post the debug output of going from the view with an animated background to the view that doesn't have it configured?
Ehm, the one I posted is everything that is actually showed in the console
I could get the same behavior if I went back and forth quickly between two views, but I'm not sure why it was happening to you immediately.
I updated the removeDefaultBackground function to restore the background if a configuration is not found/disabled.
Is it easier for you if I do prereleases or are you manually overwriting every time anyway?
It's about the same no worries :) Whatever comes easier to you
Are you not using HACS? I thought maybe prereleases would be better if you were.
Anyway, let me know if I solved this issue at least. Your other issue is more perplexing.
Yes I am, but I do also know how to overwrite the file with the raw copy from a different branch :P
With latest from master I got quite a few of those:
animated-background.js:208 Uncaught (in promise) TypeError: Cannot read property 'enabled' of null
at enabled (animated-background.js:208)
at renderBackgroundHTML (animated-background.js:291)
at Object.set hass [as hass] (animated-background.js:88)
at hass-base-mixin.ts:42
at Array.forEach (<anonymous>)
at HTMLElement.value (hass-base-mixin.ts:41)
at HTMLElement.hassChanged (url-sync-mixin.ts:32)
at HTMLElement.value (home-assistant.ts:63)
at HTMLElement.performUpdate (updating-element.ts:720)
at HTMLElement._enqueueUpdate (updating-element.ts:653)
enabled @ animated-background.js:208
renderBackgroundHTML @ animated-background.js:291
set hass @ animated-background.js:88
(anonymous) @ paper-ripple.js:356
value @ paper-ripple.js:356
hassChanged @ paper-ripple.js:356
value @ home-assistant.ts:42
performUpdate @ app.36e37a77.js:2
_enqueueUpdate @ app.36e37a77.js:2
async function (async)
_enqueueUpdate @ app.36e37a77.js:2
_requestUpdate @ app.36e37a77.js:2
set @ app.36e37a77.js:2
value @ paper-ripple.js:356
(anonymous) @ paper-ripple.js:356
n @ core.167f6968.js:1
(anonymous) @ core.167f6968.js:1
(anonymous) @ core.167f6968.js:1
_handleMessage @ core.167f6968.js:1
(anonymous) @ core.167f6968.js:1
Sorry actually HACS thought the latest release was more important than the master branch :)
Now when I switch between views I see this:
nimated Background DEBUG: View switched, no configuration found
animated-background.js:35 Animated Background DEBUG: Panel mode detected
animated-background.js:35 Animated Background DEBUG: Removing view background
animated-background.js:37
Sorry I have to use a screenshot, for some reason I cannot copy this part:
One more thing I noticed, I went to another dashboard, then back to this one.. and the background was unloaded (wrong, but also, white background) This in the console
Animated Background DEBUG: Configured entity weather.dark_sky is now partlycloudy
animated-background.js:28 Animated Background DEBUG: Starting
animated-background.js:35 Animated Background DEBUG: Debug mode enabled
animated-background.js:37 {auth: u, connection: l, connected: true, states: {…}, config: {…}, …}
animated-background.js:35 Animated Background DEBUG: Panel mode detected
animated-background.js:35 Animated Background DEBUG: Removing view background
animated-background.js:37
I genuinely have no idea why switching dashboards broke -_- Working on it
Oh I do know why. Old fixes causing new bugs D: fixing now
Okay, that's fixed (or should be)
Ok now I can switch between dashboards and it works. I tried again to switch view isnide the same dashboard and beside the fact taht it does say is switching it off, as you can see from the screenshot, it is not :D
Actually, errata corrige.. I had to clean the cache on each of the view, and now when I switch view it actually disable the background.. go figure :D
Thanks for your effort and help.. and patience :D
When debugging if you go into the Network tab in the developer tools you can disable cache while you have developer tools open. That'll give us some more consistency
Yep I do have that but somehow didn't help. What did help it's using this method (beside be in italian :D )
Your Animated Background configuration
Dashboard config
test.yaml
Version of Home Assistant "Latest" is not a version number. Please provide the actual version number. 0.109.3 Describe the bug A clear and concise description of what the bug is.
Browser console log Post anything related to animated-background.js First load
Update without cache:
Change view (in the same dashboard), this view have no animated_background configured.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen. The theme default background should be restored upon view change, if the view doesn't have animated_background configuration.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Screenshots If applicable, add screenshots to help explain your problem.
First fresh load (no cache):
View change:
View reload:
Back to first view (with animated_background)
Additional context Add any other context about the problem here.