Hero! Thank you and everyone involved!
That did the trick for me.
Just moddifying the html file was not enough.
I think I may have figured out the more-info
attributes hiding using Customizer for Lovelace. It isn’t pretty right now, but it works for me. If anyone wants to try it out you can find it on my github: CustomUI Fork
To install:
-
Overwrite your
custom-ui.js
with the one in my repo. -
Increment the version number on the Lovelace resource and/or clear your cache.
-
Set up Customizer and add the hide_attributes to the configuration file. I added in
all
as a valid option in the config file to remove all attributes from themore-info
popups.
Example configuration.yaml
entry:
customizer:
hide_attributes:
- all
- node_id
- value_index
- value_instance
- value_id
Let me know if it works on your end.
exactly where did you change what? cant seem to find the diff…
For this we have to use customizer?
The can‘t use it with the resources method?
yes, use customizer, which is a custom component. regular CC install method.
thanks, but it still is not very easy to see what you added?
I updated my repo and removed Customizer as a requirement.
Attributes to be hidden are now set in customize.yaml and customize_glob.yaml. If hide_attributes
is set in YAML, the hide attributes
node will automatically be hidden, does not need to be explicitly defined. all
is a valid option to hide all attributes.
Example (customize.yaml):
input_boolean.development:
hide_attributes:
- editable
Example (customize_glob.yaml):
"*.*":
hide_attributes:
- all
Change Log:
- I removed the
useCustomizer()
function. - I removed the
useCustomizer()
call oninit()
, replaced that with the listener for my new function:window.addEventListener("hass-more-info", window.customUI.updateMoreInfo)
- I added my new function:
updateMoreInfo
which is what handles the hiding of attributes. I changed this from removing thediv
to changing the display style tonone
.
Did you updated the custom-ui.js with the one in my repo? If so, you may have the old one still cached.
What version of HA are you on? I use some pretty direct paths to find the div
in the more-info
. I was concerned a bit that it would be different on different version. Haven’t tested that yet.
I am on 0.113.0b3
There is a change in 0.113 to the more info dialog. Working through that but ran into some supervisor issues with 113. Trying to reinstall.
from my repo answer:
Thanks for your efforts, you seem to be on a roll
Still, since you are frequently updating new changes, I am a bit hesitant to merge. Especially since 113 HA apparently has new ways for more-info and these commits are not compatible.
We have to make sure all is well going onward, so I’ll wait for that.
hope you understand, and, again, thanks!
Totally understand.
Just pushed an update that should handle the 0.113 changes. Give it a shot and let me know if it works for you.
It is working now.