This commit is contained in:
Home Assistant Version Control
2026-10-09 22:06:39 +00:00
parent 404942debb
commit 739cb714e4
4 changed files with 1446 additions and 97 deletions
+2 -1
View File
@@ -485,10 +485,11 @@ class Ot extends HTMLElement {
return String(t ?? "").trim().toLocaleLowerCase();
}
getSpoolmanItems() {
const L = this.config.spool_location;
return Object.entries(this._hass.states).map(([t, e]) => ({ entity_id: t, state: e })).filter(({ state: t }) => {
var e;
return (e = t.attributes) == null ? void 0 : e.filament_material;
}).filter(({ state: t }) => !this.config.hide_archived || t.attributes.archived === !1).sort((t, e) => B(this.config, t, e));
}).filter(({ state: t }) => !L || String((t.attributes || {}).location || "").toLowerCase() === String(L).toLowerCase()).filter(({ state: t }) => !this.config.hide_archived || t.attributes.archived === !1).sort((t, e) => B(this.config, t, e));
}
getCustomAttributeItems() {
const t = this.config.custom_attribute_entities || [], e = Number(this.config.custom_max_value || 1e3), n = this.config.custom_unit || "g";