diff --git a/update_more_info.js b/update_more_info.js index 7839fab..db1ff14 100644 --- a/update_more_info.js +++ b/update_more_info.js @@ -1,5 +1,5 @@ const Name = "Update more-info"; -const Version = "20230628"; +const Version = "20230906"; const Description = "standalone"; const Url = "https://github.com/Mariusthvdb/custom-ui"; @@ -63,10 +63,15 @@ function updateMoreInfo(ev) { let e; for (const node of t) { const o = node.getElementsByClassName("key")[0]; + // make compatible for both 2023.8 and 2023.9 if (o.innerText.toLowerCase().trim() == "hide attributes") { - e = o.parentNode - .getElementsByClassName("value")[0] - .innerText.split(",") + const valueContainer = o.parentNode.getElementsByClassName("value")[0]; + const haAttributeValue = valueContainer.querySelector('ha-attribute-value'); + const text = haAttributeValue + ? haAttributeValue.shadowRoot.textContent + : valueContainer.innerText; + e = text + .split(",") .map((item) => item.replace("_", " ").trim()); e.push("hide attributes"); }