-
Notifications
You must be signed in to change notification settings - Fork 21
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
Error : i.setConfig is not a function #237
Comments
Thank you for creating your first issue for the Swiss Army Knife custom card! |
Also seeing this error on same versions as OP. iOS Companion app. Just trying to get it off the ground so I guess I’ll try a previous version or wait edit: tried a few versions down to 2.4.3, no luck. |
Hi, Same issue here |
I too see this issue. I was just beginning with this repository and was trying out the example at Battery Card: Usage Swiss Army Knife custom card v2.5.1 |
Same here. I was copying the SAKE1 example partly to my lovelace. Worked in the beginning on Chrome and Companion app. Not on Fully Kiosk. After a HA reboot it stopped working on all my devices Funny detail is that all dashboards with SAK no longer work. Even the example dashboards Figured it out for me. I was missing the template references in ui-lovelace.yaml. See step 2b of the installation manual After digging more: It's the same issue as described here: #161 The includes that should be in ui-lovelace.yaml do not work when in storage-mode. Only when in yaml-mode. As far as I know, there currently is no way to have the required includes when in storage-mode. But hopefully, I am wrong here,.. |
Hello @BarBaar44 , I use the Storage mode option, for SAK templates, I add the includes at the beginning of the Filename file. It works very well. |
my config got dublicate sometimes and when i fix it cards start work until it again dublicate keys in configs, also here error
sometimes it brake my configuration.yaml and sometimes this files
|
|
See also: My conclusion is that the last few HA versions have problems loading the Lovelace configuration. With issue #243 I have now proven that HA loads an OLD configuration. I added two files a week ago, and those are NOT loaded by default, only after ctrl-F5. This happens both on Desktop and mobile (iPad/iPhone). The problems look similar to this issue: if you have changed files, HA can't find the SAK card anymore in the resources... I made an issue for the HA frontend, but there are no solutions yet... @VR-VIDEO , those might be indeed duplicate definitions or just yaml anchors that the HA YAML loader can't handle. I will check those files and lines! @wernerhp , YEP, if even those are not defined, than Lovelace hasn't loaded even the templates... BTW: did anyone see any differences if HA is restarted? |
Yeah, I get the same with |
I followed all the instructions step-by-step something like 10 times and now matter what, I cannot use this card :( |
In case someone comes here with the same issue, here is my experience. First, the installation instructions mention that you need to include the Second, make sure you use the full path to the file, starting with |
I've followed so many of the different instructions on here and for the life of me I can't get this card to work on 2024.3.0.. |
Someone I know, managed to make the Swiss Amy Knife cards work following the problem i.setConfig is not a function. He did the following steps and it works for him. Is it possible for peoples who have this problem to take a test? Steps: I have just taken over everything from the installation of the dashboard that uses Swiss-Army-Knife, and I was able to make it work in a repeatable way. This involves a few manual steps since the installation of Swiss-Army-Knife is broken. The process assumes that HACS is installed and configured, and that Lovelace is used in more storage. Installation of Swiss Army Knife custom card from HACS Ensure that the Javascript module /hacsfiles/swiss-army-knife-card/swiss-army-knife-card.js is loaded into the environment Clone the git repo of swiss-army-knife to a suitable place to copy files https://github.com/AmoebeLabs/swiss-army-knife-card.git According to the SwissArmyKnife doc, step 2A, copy the sak_templates folder of the git repo (ha-config/lovelace) into your lovelace folder I didn't do step 2B of the SwissArmyKnife doc In the SwissArmyKnife doc, step 2C, add the following configuration in the configuration.yaml file:
|
Okay... back in this place.. Since the upgrade to HA 2024.4, my dashboard just stopped working. Getting this in de HA-logs: `Logger: frontend.js.latest.202404041 Uncaught error from Chrome 123.0.0.0 on Linux x86_64 Error: 2.5.1 get styles (/hacsfiles/swiss-army-knife-card/swiss-army-knife-card.js:923:1550) gs.getStyles (/hacsfiles/swiss-army-knife-card/swiss-army-knife-card.js:159:137) gs._getUniqueStyles (/hacsfiles/swiss-army-knife-card/swiss-army-knife-card.js:159:256) gs.initialize (/hacsfiles/swiss-army-knife-card/swiss-army-knife-card.js:159:690) new K (/hacsfiles/swiss-army-knife-card/swiss-army-knife-card.js:134:2350) new gs (/hacsfiles/swiss-army-knife-card/swiss-army-knife-card.js:702:1424) E (src/scoped-custom-element-registry.js:388:6) J (src/scoped-custom-element-registry.js:236:10) createErrorCardConfig (src/panels/lovelace/create-element/create-element-base.ts:100:27) customElements.get (src/panels/lovelace/create-element/create-element-base.ts:118:11)` As I have not changed anything, I am hesitant to change anything. Good very well be just another template-not-found-thing. I don't know... Any help is appreciated (again!). And wondering if there is still some active development, as there hasn't been any releases lately? |
I've been trying to get SAK working, but facing this error as well. Running HA 2024.4.3 and seeing the e.setConfig is not a function error more or less consistently. Found the following errors in the HA log:
Interestingly, the card seems to work (well, most of the time) on my Mac using Firefox, but my Android HA app seems to exhibit the error all the time. Apart from one time, when my Android App started working until I changed the config of the SAK card. |
Hi, same probleme here with i.setConfig is not a function Cong: |
``I find myself in the same place. after spending lots of hours just to install, at least that´s what I thoguth, now cards show isetConfig is not a function message I took a look at the logs and thers is plenty of them, well there are errors and warnings
|
Is there any solution to this? I installed via HACS, made all manual steps described in 2. Copied files to /lovelace, set the lovelace: storage mode in the configuration.yaml and copied the example dashboard. The dashboard showed up but "i.setConfig is not a function" on all views of the example dashboard. I think for whatever reason the loading of the required ressources failed. I got it to work for a short period of time by deleting the browser cache. No its back to the error. This is not usable. |
Dear all -
Swiss Army Knife version
The version I am using is : v 2.5.1
HA version
Home Assistant 2023.6.3
Supervisor 2023.06.2
Operating System 10.3
Frontend 20230608.0 - latest
Bug description
I installed the frontend as discribe on the official page, as it's not possible to have a full install via HACS. when I use the examples I got this error.
Desktop browser (please complete the following information):
I hope it's clear.
Thanks for your help.
The text was updated successfully, but these errors were encountered: