-
Notifications
You must be signed in to change notification settings - Fork 12
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
dimmer-button no longer works with latest HAOS? #10
Comments
Okay, I'm 90% sure the issue is that
|
Okay, I found a fix. Download https://cdn.jsdelivr.net/gh/lit/dist@2/core/lit-core.min.js and put it next to
to
and refresh the page (might need to clear cache). |
Thanks for the tip. Unfortunately it doesn't work for me. Error message remains. |
Are you getting the error in the browser or the mobile app? On Android, you need to long press the app icon, click "App info" > "Storage and cache" > "Clear cache" for the fix to apply. I'm sure there is something similar for iOS. Or browser, I think ctrl + shift + R is sufficient to force the page to re-download the javascript files. If that still doesn't work, can you share the errors from the browser dev console? On Firefox you can bring it up with ctrl + shift + I and select the console tab. |
@BenBergman when you say "put it next to 'dimmer-button.js' what do you mean? |
If you put |
No matter what I tried, it always reloaded the old version in HA. I have now created my “own” version and adopted your changes. I then reinstalled it via HACS and now it works. Thanks again for your tip. |
@ichwars I'm having the same issue. I did as @BenBergman suggested and put the lit-core.min.js in the same folder as my dimmer-button. I edited line 12 as was suggested and it still doesn't work. Can you please explain what you mean when you say you "created your own"? I'd like to try whatever you did to resolve the lingering error. |
@crankycowboy I have created a fork version here and incorporated the changes made by BenBergman. I then uninstalled the original version of dimmer-button in HACS and installed “my” fork version under Custom Repositories. HA restarted and works. |
@ichwars thanks, that makes sense. I did the same, I modified the dimmer-button.js and also uploaded the lit-core-min.js file. When I add the custom repository, do I just point that to the page of my fork and then what do I select as the "type"? Sorry for all the questions, but greatly appreciate the help. |
@crankycowboy No problem. Simply select Dashboard as the type. |
Ah, that probably explains the difference between our installs. I didn't install via HACS since the install directions for |
@ichwars thanks for this fix, use this a lot to control volume for speakers, lost without it :) |
@BenBergman I must have missed that with the copying. xD @djreg The credit goes to BenBergman, but I'm glad if I could contribute to the solution. I use it for my lighting. Without it I would have had to tinker with everything again. |
@ichwars I have no idea what I'm doing wrong. I'm still getting the error. I even removed the dimmer button, removed my custom repository. Made sure the folder was gone. And then added your repository which added fine. Restarted Home Assistant and I'm still getting the same error message. Any idea what I may be doing wrong? Sorry (again) for the headaches. |
Are you seeing the error in the browser and the app? If you have the issue in the browser, can you paste any errors from the browser dev console here? Maybe there is something useful hiding in there. You could also try installing |
@crankycowboy The |
@ichwars , first let me say thank you for taking the time to try to help. You've spent way more time on this than you should have had to. I guess I'm missing something. I tried manually adding it. Same error (on all devices). I then deleted my repository and just forked yours. I reinstalled via Hacs...same error (and verified all files are there). I've refreshed, restarted and closed my VM and restarted. Same error. I then manually deleted the resource in resources and manually added it. Same error. Any clue what could be going on? Picture for reference |
@crankycowboy No problem. But they didn't have to fork “my” version again. Just copy the link in HACS and install it. A basic question: Are you sure you have deleted the browser cache? Or checked whether the files: Another possibility would be to click RMB on the page where the error occurs and select Investigate (Chrome & Firefox) then click on Console and search for |
@ichwars I know I didn't have fork your repository. It's just nothing else was working so I was willing to try anything. Yes, dimmer-button.js and lit-core.min.js are present under www/community/dimmer-button. Attached are the errors I'm getting. It looks like maybe it's having a problem loading the lit-core.min.js file? |
Ok, I got it. I did as @BenBergman suggested and manually added it in resources opposed to letting HACS do the entry. thank you for all the help. |
I just updated my Home Assistant OS and shortly after noticed that my
dimmer-button
s were no longer working and instead showingCustom element doesn't exist: dimmer-button
.I had the who repo cloned into
/www/dimmer-button/
and/local/dimmer-button/dimmer-button.js
as a dashboard resource file. I noticed that the presence of git metadata was preventing the directory from opening in the Home Assistant file editor, so I also tried copyingdimmer-button.js
to just/www/dimmer-button.js
and changing the dashboard resource to/local/dimmer-button.js
. I also tried using the more recent version of the file from the dev branch.It is entirely possible I did something else to screw this up, but I can't for the life of me figure out what, so I'm wondering if maybe there is an incompatibility with the latest OS updates?
The text was updated successfully, but these errors were encountered: