-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
UI Editor Not working any more #233
Comments
I have some additional information: Changing things in YAML mode are shown in UI editor when switching back to UI editor, but not the other way round: Changing things in UI editor or not shown in YAML mode. Furthermore I have recognized that the card configuration does not show "SAVE" when changing things in UI editor only. |
And again some information: Just saw that there are some strange errors in the logs . Don't know if this is linked to the problem.
|
Weird. Can you make sure your browser cache gets cleared? It sounds like you are using a cached old version of the editor. I just tested editing and it worked fine for me. |
I'm running into this issue as well. I'm using 2.2.1 which I just upgraded to as part of my troubleshooting, but I had this problem on 2.0.0 as well. I'm on HA 2021.4.0.
|
Do you edit existing cards or add new? Yesterday I tested adding a new card and changing every option in the editor. |
Just updated to 2.2.1, issue is still there. I have already cleared the cache of my PC, it was the first thing I have tried. Today I even have reinstalled Home assistant App, issue is still there :-( |
Modifing or creating a new card doesn't matter. The only steps I have done with a new card: Result:
Strange.... |
Weeeeird. And when you open that config, try to view it as yaml, how does it look? |
Here is the result of the steps described above:
I have written some text in every UI editor field --> same behaviour. Here a new log:
|
So you are editing using the Android mobile app, or? |
I was seeing this issue in Firefox on the desktop. I'll provide more info when I'm back at the computer. |
Could it be a language issue? I'm German On the pc error is always the same: New card on windows 10 with Microsoft Edge Version 89.0.774.75 (Offizielles Build) (64-Bit)
New card on windows 10 with Google Chrome Version 89.0.4389.114 (Offizieller Build) (64-Bit)
|
Starting in v2.2.2 I also publish a Unfortunately you need to manually download and overwrite the file with this debug file to install it. Could you test it and see what line number it errs on? |
I'm not sure if I understood it correct, I have:
Result after creating a new card with entity only:
|
You understood perfectly 👍 |
Issue still there with V2.2.3 :-( For your information, I'm using HASS on the following:
I have tested the card on a friend's installation (same hardware / installation): same issue. Furthermore I have reflashed my card today: same issue |
2.3.1 didn't solve it for me as well. Still getting the same read-only and "not extensible" errors.
Running as a VM in Proxmox. |
I did remove some errors I finally managed to reproduce in Chrome myself. Curious to hear if this helps your cases |
Yeah, expected as much. I can't for the life of me reproduce that error |
Unforntunately V2.3.2 did neither fix the issue for me 😢 |
Ok, update: I can now make changes in the YAML that are accurately reflected. So it appears you solved part of it, but the UI configuration is still broken. |
same issue for me, plus one other I have a toggle_entity defined. this would normally place a small switch in the top right corner of my card. this is NOT being displayed. `toggle_entity: thanx in advance |
one addition if it helps... just noticed this in my logs `Logger: frontend.js.latest.202104073 http://homeassistant.local:8123/hacsfiles/simple-thermostat/simple-thermostat.js:285:61511 TypeError: Attempted to assign to readonly property. |
I've still not been able to reproduce this bug myself, which is highly frustrating. But, I did notice that the same problem have been reported across multiple other cards historically so there might be something related to how the card edit UI works in HA I need to look into. Only half of the editor comes from code in the custom card, the rest is built into HA. Anyways, I'm still investigating this issue from time to time and do intend to get it fixed eventually. |
No worries, take your time! |
Fresh install here and I get the following error in my Home Assistant Logs: And this is what it looks like when I switch to YAML: Changes in the UI editor just don't seem to do anything, no YAML is every produced. |
Using HA 2021.4.5 and simple-thermostat 2.4.0 I get the following behavior. Adding a new card in the UI and selecting one of my thermostats in the UI yields this in the Firefox JS Console:
In addition the following is visible in homeassistant logs:
I guess for the JS part I'd need a non-minified version to provide a more useful backtrace, line 285 is the entire JS code in one line. I'll try to built it locally and see if my limited JS knowledge can provide anything. JS error when using the unminified debug version:
|
After a bit of digging it looks like commit 7f66a55 changed the way adding properties to Since setValue supports nested config options while the old code only supported flat properties on the config object and my JS is still rather limited I'm a bit at a loss how a proper fix could look like. But maybe this provides a starting point of how to tackle this. |
Thanks for digging in @stefangehn |
The only peculiar part is how it only happens for some though – and not me, despite heavy attempts at reproducing it. |
I have the same problem. I've been following this thread to see if a fix will come soon. It seems that you guys are getting closer to figuring out what's going on. I'll be happy to test any code that can help reproduce/debug this issue. |
Use a copy of this.config in valueChanged, considering the passed config might be frozen Ref #233
The fix works for toplevel properties like this.config = { ...config } However since simple-thermostat uses nested config entries it needs some sort of deep-clone implementation for the setConfig code, otherwise all the sub-objects will still be frozen. Afterwards the remaining code does not appear to need any of the previous workarounds anymore, i.e. FWIW, I partially got the card working with this: setConfig(config: CardConfig): void {
this.config = {
...config,
header: {
...config?.header,
},
layout: {
...config?.layout,
mode: {
...config?.layout?.mode,
},
sensors: {
...config?.layout?.sensors,
},
},
hide: {
...config?.hide,
},
label: {
...config?.label,
},
}
} Mind you, this will create all the sub-sections like |
Hooray! That was the confirmation I'd hoped for. Thanks a bunch for digging into this 💯 ! I'll make sure it just makes a copy in the recursive setvalue func. Should probably find time to do this in a few days |
🎉 This issue has been resolved in version 2.4.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
LMK how it goes 🤞 |
Seems to Work! Thank you |
Hello, since 2.0.0 the ui editor is not working anymore. Changes are not stored. Configuration can only be done via YAML.
I'm wondering why this issue has not already been posted, did I oversee any note / comment / hint?
Thank you, great card.
The text was updated successfully, but these errors were encountered: