diff --git a/.storage/lovelace.3d_printer_cellphone b/.storage/lovelace.3d_printer_cellphone index 4c85997e..e4a1ac6c 100644 --- a/.storage/lovelace.3d_printer_cellphone +++ b/.storage/lovelace.3d_printer_cellphone @@ -14,6 +14,18 @@ { "type": "heading", "heading": "New section" + }, + { + "type": "custom:auto-entities", + "card": { + "type": "grid", + "columns": 4, + "square": false + }, + "card_param": "cards", + "filter": { + "template": "{% set ns = namespace(cards=[]) %}\n{% for s in states.sensor %}\n {% if s.entity_id.startswith('sensor.spoolman_spool_') %}\n {% set loc = (s.attributes.location | default('')) | lower %}\n {% if 'cfs lite' in loc %}\n {% set hex = s.attributes.filament_color_hex | default('44739e') %}\n {% set hex_clean = hex if hex.startswith('#') else '#' ~ hex %}\n {% set remain = (s.attributes.remaining_weight | default(s.state) | float(0)) | round(1) %}\n {% set total = (s.attributes.initial_weight | default(1000) | float(1000)) %}\n {% set raw_pct = ((remain / total) * 100) | round(1) %}\n {% set pct = 0 if raw_pct < 0 else (100 if raw_pct > 100 else raw_pct) %}\n {% set border = '#d0d0d0' if hex_clean | lower in ['#ffffff', '#fff'] else 'transparent' %}\n\n {% set card = {\n \"type\": \"custom:button-card\",\n \"entity\": s.entity_id,\n \"show_icon\": false,\n \"show_state\": false,\n \"show_name\": false,\n \"custom_fields\": {\n \"tube\": \"