I’ve been digging into the code again, this time just comparing the HTML between the working and not working labels versions. So turns out this element is missing altogether when the labels don’t show up:
And also the class directive for the input is different
mdc-text-field mdc-text-field--filled mdc-text-field--label-floating
^ when the labels show up
mdc-text-field mdc-text-field--no-label mdc-text-field--filled
^ labels don’t show up.
If I paste the missing stuff into the inspector of the one where it doesn’t work, the label does show up properly, so that indicates it’s just being formed wrong at some point.
Also, when the config flow is launched, it gets the flow config as json from the hass backend - that’s identical between the versions, so it looks like the frontend is just broken there for some reason.
Update: I seem to have found the js-function that creates the text fields, but I haven’t managed to figure out why it does that no-label variant on this installation.
More info:
I grabbed the arch linux package and put all the files in a local git repo → then rsync’d everything from the pip-package into it so I could see what the difference was. At quick glance, the difference is mainly that around 10 000 translation files are missing from the arch linux package! That might explain the situation.
For whatever reason, the Arch Linux package is missing all the translation files! So once I rsynced in all the .json files from the pip-package, the labels appeared. Woohoo
I’ll see if I can figure out what needs to be changed in the PKGBUILD so that it’ll include the files in the future…
You are awesome! :3
Thanks for the great work! -and thanks for updating the issue ticket
Now, we have to wait that the package maintainer react. Please let me know when you know how to modify the PKGBUILD
Yup, looks like that previous thing worked
I built a package of the 2023.5.1 version like before, just added
python -m script.translations develop --all
in the build() function of the PKGBUILD after cd home-assistant. So it updates the translation files before it does the python build. (I don’t know if that would make more sense to do in the prepare() function?) Then I installed the package on my other raspberry pi, and the labels do indeed show up There’s a bunch of dependency errors running that though, but that same thing should work with an older version just the same.
I’ll do one more test - the same build but without that translation update command, just to see if that’s indeed what causes the difference and not some other random occurrence.
Update: Yes, that was it The same package without that command doesn’t show the labels.