.storage/lovelace.sparkx_i7, zigbee2mqtt/state.json

This commit is contained in:
Home Assistant Version Control
2026-10-14 17:12:57 +00:00
parent 191ddaa9ec
commit 9f8ed4ce39
2 changed files with 236 additions and 236 deletions
+223 -223
View File
@@ -289,11 +289,11 @@
"type": "tile"
},
{
"type": "tile",
"entity": "sensor.sparkx_moonraker_totals_print_time",
"features_position": "bottom",
"name": "Total Print",
"vertical": false,
"features_position": "bottom"
"type": "tile",
"vertical": false
}
],
"type": "grid"
@@ -400,13 +400,11 @@
"type": "history-graph"
},
{
"type": "custom:apexcharts-card",
"graph_span": "1h",
"header": {
"show": true,
"title": "Fan Speeds",
"show_states": true,
"colorize_states": true
"all_series_config": {
"show": {
"name_in_header": true
},
"stroke_width": 2
},
"apex_config": {
"chart": {
@@ -417,25 +415,29 @@
},
"grid": {
"xaxis": {
"borderColor": "#555",
"lines": {
"show": true
},
"borderColor": "#555"
}
}
},
"yaxis": [
{
"opposite": true,
"decimals": 0,
"opposite": true,
"tickAmount": 2
}
]
},
"all_series_config": {
"stroke_width": 2,
"show": {
"name_in_header": true
}
"graph_span": "1h",
"grid_options": {
"columns": "full"
},
"header": {
"colorize_states": true,
"show": true,
"show_states": true,
"title": "Fan Speeds"
},
"series": [
{
@@ -443,9 +445,7 @@
"name": "Hotend"
}
],
"grid_options": {
"columns": "full"
}
"type": "custom:apexcharts-card"
}
],
"type": "grid"
@@ -586,11 +586,11 @@
"columns": 6
},
"icon": "mdi:cash",
"name": "Job Cost (total)",
"type": "custom:mushroom-template-card",
"multiline_secondary": true,
"name": "Job Cost (total)",
"primary": "{% set st = states('sensor.sparkx_i7_print_status') %}{% if st in ['printing', 'paused'] %}{{ states('sensor.sparkx_i7_filament_cost') | round(2) }} ${% else %}{{ states('input_number.sparkx_i7_last_job_cost') | round(2) }} ${% endif %}",
"secondary": "{% set st = states('sensor.sparkx_i7_print_status') %}{% if st in ['printing', 'paused'] %}this job (live){% else %}last job{% endif %}"
"secondary": "{% set st = states('sensor.sparkx_i7_print_status') %}{% if st in ['printing', 'paused'] %}this job (live){% else %}last job{% endif %}",
"type": "custom:mushroom-template-card"
},
{
"entity": "sensor.sparkx_i7_filament_cost_daily",
@@ -815,7 +815,7 @@
"multiline_secondary": true,
"name": "Slot 1",
"primary": "{{ states('sensor.sparkx_i7_cfs_box_1_slot_1_filament') }}",
"secondary": "{% set col = states('sensor.sparkx_i7_slot_1_color_name') %}{% if col %}{{ col }} · {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_1_remaining') }}% left",
"secondary": "{% set col = states('sensor.sparkx_i7_slot_1_color_name') %}{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_1_color') | replace('#','') | lower %}{% set ns = namespace(id='', rem=0, base=0) %}{% for e in integration_entities('spoolman') if e.endswith('_color_hex') %}{% if ns.id == '' and (states(e) | replace('#','') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set ns.id = states(e[:-10] ~ '_id') %}{% set ns.rem = states(e[:-10]) | float(0) %}{% set ns.base = state_attr(e[:-10], 'filament_weight') | float(0) %}{% endif %}{% endfor %}{% if col %}{{ col }} · {% endif %}{% if ns.id != '' %}{{ ns.rem | round(0) | int }} g left ({{ (ns.rem / ns.base * 100) | round(0) | int if ns.base > 0 else 0 }}%){% else %}no spool matched{% endif %}",
"type": "custom:mushroom-template-card"
},
{
@@ -972,434 +972,434 @@
"type": "sections"
},
{
"title": "Spoolman",
"path": "spoolman",
"icon": "mdi:package-variant-closed",
"type": "sections",
"max_columns": 4,
"path": "spoolman",
"sections": [
{
"type": "grid",
"cards": [
{
"type": "heading",
"heading": "CFS Slots — per-color deduction",
"icon": "mdi:printer-filament"
"icon": "mdi:printer-filament",
"type": "heading"
},
{
"type": "custom:auto-entities",
"card": {
"type": "grid",
"columns": 4,
"square": false
"square": false,
"type": "grid"
},
"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\": \"<div class='tube-bg'><div class='tube-fill' style='height: \" ~ pct ~ \"%; background-color: \" ~ hex_clean ~ \";'></div><div class='tube-text'>\" ~ remain ~ \"g</div></div>\"\n },\n \"styles\": {\n \"card\": [\n {\"background\": \"transparent\"},\n {\"box-shadow\": \"none\"},\n {\"border\": \"none\"},\n {\"padding\": \"8px 2px\"},\n {\"display\": \"flex\"},\n {\"flex-direction\": \"column\"},\n {\"align-items\": \"center\"}\n ],\n \"custom_fields\": {\n \"tube\": [\n {\"width\": \"100%\"},\n {\"display\": \"flex\"},\n {\"justify-content\": \"center\"}\n ]\n }\n },\n \"extra_styles\": \"\n .tube-bg {\n position: relative;\n width: 60px;\n height: 180px;\n background-color: #dedede;\n border-radius: 20px;\n overflow: hidden;\n border: 1px solid \" ~ border ~ \";\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n }\n .tube-fill {\n width: 100%;\n border-radius: 0 0 19px 19px;\n }\n .tube-text {\n position: absolute;\n top: 48%;\n left: 50%;\n transform: translate(-50%, -50%);\n font-size: 13px;\n font-weight: 800;\n color: #111111;\n pointer-events: none;\n z-index: 2;\n white-space: nowrap;\n }\n \",\n \"tap_action\": {\n \"action\": \"more-info\"\n }\n } %}\n {% set ns.cards = ns.cards + [card] %}\n {% endif %}\n {% endif %}\n{% endfor %}\n{{ ns.cards }}"
}
},
"type": "custom:auto-entities"
},
{
"type": "custom:mushroom-template-card",
"entity": "sensor.sparkx_i7_cfs_box_1_slot_1_color",
"name": "Slot 1",
"grid_options": {
"columns": "full"
},
"icon": "mdi:printer-filament",
"icon_color": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_1_color') | replace('#', '') | lower %}{% if c | length == 6 %}#{{ c }}{% else %}var(--primary-color){% endif %}",
"multiline_secondary": true,
"name": "Slot 1",
"picture": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_1_color') | replace('#','') | lower %}{% set svg = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"96\" height=\"96\"><rect width=\"96\" height=\"96\" rx=\"20\" fill=\"#' ~ c ~ '\" stroke=\"rgba(127,127,127,0.6)\" stroke-width=\"4\"/></svg>' %}{{ 'data:image/svg+xml;base64,' ~ svg | base64_encode if c | length == 6 else '' }}",
"primary": "{{ states('sensor.sparkx_i7_slot_1_color_name') }} (#{{ states('sensor.sparkx_i7_cfs_box_1_slot_1_color') | replace('#', '') | upper }})",
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_1_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}• Spool {{ ns.id }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_vendor') | default('?', true) }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_material') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}\n• This print: {{ (states('input_number.sparkx_i7_slot_1_grams') | float(0)) | round(1) }} g",
"multiline_secondary": true,
"type": "custom:mushroom-template-card"
},
{
"entity": "sensor.sparkx_i7_cfs_box_1_slot_2_color",
"grid_options": {
"columns": "full"
},
"picture": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_1_color') | replace('#','') | lower %}{% set svg = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"96\" height=\"96\"><rect width=\"96\" height=\"96\" rx=\"20\" fill=\"#' ~ c ~ '\" stroke=\"rgba(127,127,127,0.6)\" stroke-width=\"4\"/></svg>' %}{{ 'data:image/svg+xml;base64,' ~ svg | base64_encode if c | length == 6 else '' }}"
},
{
"type": "custom:mushroom-template-card",
"entity": "sensor.sparkx_i7_cfs_box_1_slot_2_color",
"name": "Slot 2",
"icon": "mdi:printer-filament",
"icon_color": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_2_color') | replace('#', '') | lower %}{% if c | length == 6 %}#{{ c }}{% else %}var(--primary-color){% endif %}",
"multiline_secondary": true,
"name": "Slot 2",
"picture": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_2_color') | replace('#','') | lower %}{% set svg = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"96\" height=\"96\"><rect width=\"96\" height=\"96\" rx=\"20\" fill=\"#' ~ c ~ '\" stroke=\"rgba(127,127,127,0.6)\" stroke-width=\"4\"/></svg>' %}{{ 'data:image/svg+xml;base64,' ~ svg | base64_encode if c | length == 6 else '' }}",
"primary": "{{ states('sensor.sparkx_i7_slot_2_color_name') }} (#{{ states('sensor.sparkx_i7_cfs_box_1_slot_2_color') | replace('#', '') | upper }})",
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_2_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}• Spool {{ ns.id }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_vendor') | default('?', true) }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_material') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}\n• This print: {{ (states('input_number.sparkx_i7_slot_2_grams') | float(0)) | round(1) }} g",
"multiline_secondary": true,
"type": "custom:mushroom-template-card"
},
{
"entity": "sensor.sparkx_i7_cfs_box_1_slot_3_color",
"grid_options": {
"columns": "full"
},
"picture": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_2_color') | replace('#','') | lower %}{% set svg = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"96\" height=\"96\"><rect width=\"96\" height=\"96\" rx=\"20\" fill=\"#' ~ c ~ '\" stroke=\"rgba(127,127,127,0.6)\" stroke-width=\"4\"/></svg>' %}{{ 'data:image/svg+xml;base64,' ~ svg | base64_encode if c | length == 6 else '' }}"
},
{
"type": "custom:mushroom-template-card",
"entity": "sensor.sparkx_i7_cfs_box_1_slot_3_color",
"name": "Slot 3",
"icon": "mdi:printer-filament",
"icon_color": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_3_color') | replace('#', '') | lower %}{% if c | length == 6 %}#{{ c }}{% else %}var(--primary-color){% endif %}",
"multiline_secondary": true,
"name": "Slot 3",
"picture": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_3_color') | replace('#','') | lower %}{% set svg = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"96\" height=\"96\"><rect width=\"96\" height=\"96\" rx=\"20\" fill=\"#' ~ c ~ '\" stroke=\"rgba(127,127,127,0.6)\" stroke-width=\"4\"/></svg>' %}{{ 'data:image/svg+xml;base64,' ~ svg | base64_encode if c | length == 6 else '' }}",
"primary": "{{ states('sensor.sparkx_i7_slot_3_color_name') }} (#{{ states('sensor.sparkx_i7_cfs_box_1_slot_3_color') | replace('#', '') | upper }})",
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_3_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}• Spool {{ ns.id }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_vendor') | default('?', true) }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_material') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}\n• This print: {{ (states('input_number.sparkx_i7_slot_3_grams') | float(0)) | round(1) }} g",
"multiline_secondary": true,
"type": "custom:mushroom-template-card"
},
{
"entity": "sensor.sparkx_i7_cfs_box_1_slot_4_color",
"grid_options": {
"columns": "full"
},
"picture": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_3_color') | replace('#','') | lower %}{% set svg = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"96\" height=\"96\"><rect width=\"96\" height=\"96\" rx=\"20\" fill=\"#' ~ c ~ '\" stroke=\"rgba(127,127,127,0.6)\" stroke-width=\"4\"/></svg>' %}{{ 'data:image/svg+xml;base64,' ~ svg | base64_encode if c | length == 6 else '' }}"
},
{
"type": "custom:mushroom-template-card",
"entity": "sensor.sparkx_i7_cfs_box_1_slot_4_color",
"name": "Slot 4",
"icon": "mdi:printer-filament",
"icon_color": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_4_color') | replace('#', '') | lower %}{% if c | length == 6 %}#{{ c }}{% else %}var(--primary-color){% endif %}",
"multiline_secondary": true,
"name": "Slot 4",
"picture": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_4_color') | replace('#','') | lower %}{% set svg = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"96\" height=\"96\"><rect width=\"96\" height=\"96\" rx=\"20\" fill=\"#' ~ c ~ '\" stroke=\"rgba(127,127,127,0.6)\" stroke-width=\"4\"/></svg>' %}{{ 'data:image/svg+xml;base64,' ~ svg | base64_encode if c | length == 6 else '' }}",
"primary": "{{ states('sensor.sparkx_i7_slot_4_color_name') }} (#{{ states('sensor.sparkx_i7_cfs_box_1_slot_4_color') | replace('#', '') | upper }})",
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_4_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}• Spool {{ ns.id }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_vendor') | default('?', true) }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_material') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}\n• This print: {{ (states('input_number.sparkx_i7_slot_4_grams') | float(0)) | round(1) }} g",
"multiline_secondary": true,
"type": "custom:mushroom-template-card"
},
{
"heading": "Usage",
"heading_style": "title",
"icon": "mdi:printer-3d-nozzle-outline",
"type": "heading"
},
{
"entity": "input_number.sparkx_i7_spoolman_length_checkpoint",
"grid_options": {
"columns": "full"
},
"picture": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_4_color') | replace('#','') | lower %}{% set svg = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"96\" height=\"96\"><rect width=\"96\" height=\"96\" rx=\"20\" fill=\"#' ~ c ~ '\" stroke=\"rgba(127,127,127,0.6)\" stroke-width=\"4\"/></svg>' %}{{ 'data:image/svg+xml;base64,' ~ svg | base64_encode if c | length == 6 else '' }}"
},
{
"type": "heading",
"icon": "mdi:printer-3d-nozzle-outline",
"heading_style": "title",
"heading": "Usage"
},
{
"type": "tile",
"entity": "input_number.sparkx_i7_spoolman_length_checkpoint",
"name": "Length Checkpoint (cm)",
"icon": "mdi:ruler-measure",
"grid_options": {
"columns": "full"
}
"name": "Length Checkpoint (cm)",
"type": "tile"
},
{
"type": "tile",
"entity": "input_text.sparkx_i7_print_spool_latch",
"name": "Latched CFS Slot",
"grid_options": {
"columns": "full"
},
"icon": "mdi:link-variant",
"grid_options": {
"columns": "full"
}
"name": "Latched CFS Slot",
"type": "tile"
},
{
"type": "tile",
"entity": "sensor.sparkx_i7_used_material_length",
"name": "Used Material Total (cm)",
"icon": "mdi:plus-minus",
"grid_options": {
"columns": "full"
}
},
"icon": "mdi:plus-minus",
"name": "Used Material Total (cm)",
"type": "tile"
},
{
"type": "tile",
"entity": "sensor.sparkx_i7_filament_weight_estimated",
"name": "Current Job Weight (est.)",
"icon": "mdi:weight-gram",
"grid_options": {
"columns": 12,
"rows": 1
}
},
"icon": "mdi:weight-gram",
"name": "Current Job Weight (est.)",
"type": "tile"
},
{
"type": "custom:mushroom-template-card",
"entity": "sensor.sparkx_i7_active_filament_slot",
"name": "Next Deduction Match",
"icon": "mdi:magnet",
"icon_color": "{% set slot = states('sensor.sparkx_i7_active_filament_slot') %}{% set c = states('sensor.sparkx_i7_cfs_' ~ (slot | lower | replace(' ', '_')) ~ '_color') | replace('#', '') | lower %}{% if c | length == 6 %}#{{ c }}{% else %}var(--primary-color){% endif %}",
"primary": "{{ states('sensor.sparkx_i7_active_filament_slot') }}",
"secondary": "{% set slot = states('sensor.sparkx_i7_active_filament_slot') %}{% set ce = 'sensor.sparkx_i7_cfs_' ~ (slot | lower | replace(' ', '_')) ~ '_color' %}{% set color = states(ce) | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}Color #{{ color | upper }} → spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id ~ '_filament_name') }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left){% elif slot in ['', 'unknown', 'unavailable'] %}No slot latched{% elif color in ['', 'unknown', 'unavailable'] %}Slot color unavailable{% else %}Color #{{ color | upper }} — no spool with stock{% endif %}",
"multiline_secondary": true,
"grid_options": {
"columns": "full"
}
},
"icon": "mdi:magnet",
"icon_color": "{% set slot = states('sensor.sparkx_i7_active_filament_slot') %}{% set c = states('sensor.sparkx_i7_cfs_' ~ (slot | lower | replace(' ', '_')) ~ '_color') | replace('#', '') | lower %}{% if c | length == 6 %}#{{ c }}{% else %}var(--primary-color){% endif %}",
"multiline_secondary": true,
"name": "Next Deduction Match",
"primary": "{{ states('sensor.sparkx_i7_active_filament_slot') }}",
"secondary": "{% set slot = states('sensor.sparkx_i7_active_filament_slot') %}{% set ce = 'sensor.sparkx_i7_cfs_' ~ (slot | lower | replace(' ', '_')) ~ '_color' %}{% set color = states(ce) | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}Color #{{ color | upper }} → spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id ~ '_filament_name') }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left){% elif slot in ['', 'unknown', 'unavailable'] %}No slot latched{% elif color in ['', 'unknown', 'unavailable'] %}Slot color unavailable{% else %}Color #{{ color | upper }} — no spool with stock{% endif %}",
"type": "custom:mushroom-template-card"
},
{
"type": "markdown",
"content": "**Spoolman UI:** [http://192.168.1.140:7912](http://192.168.1.140:7912)\n\nEach CFS slot is matched to the Spoolman spool with the same **color hex** that still has stock (remaining > 0) **and whose location is CFS Lite**. All 4 rolls live in the **CFS Lite** location in Spoolman.\n\n**Replaced a roll?** Register the new roll in Spoolman with the same color hex and location CFS Lite. No Home Assistant changes needed — a same-color roll in another location (e.g. Storage) is ignored, and exhausted spools are skipped automatically.",
"grid_options": {
"columns": "full"
}
},
"type": "markdown"
}
]
],
"type": "grid"
},
{
"type": "grid",
"cards": [
{
"type": "heading",
"heading": "Spool Details — CFS Lite",
"icon": "mdi:spool"
"icon": "mdi:spool",
"type": "heading"
},
{
"type": "custom:mushroom-template-card",
"entity": "sensor.sparkx_i7_cfs_box_1_slot_1_color",
"name": "Slot 1",
"grid_options": {
"columns": "full"
},
"icon": "mdi:spool",
"icon_color": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_1_color') | replace('#', '') | lower %}{% if c | length == 6 %}#{{ c }}{% else %}var(--primary-color){% endif %}",
"multiline_secondary": true,
"name": "Slot 1",
"picture": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_1_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'entity_picture') if ns.id and state_attr('sensor.spoolman_spool_' ~ ns.id, 'entity_picture') else '' }}",
"primary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_1_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}Spool {{ ns.id }} · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_name') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}Slot color unavailable{% else %}No spool with stock matches this color{% endif %}",
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_1_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}• {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_vendor_name') | default('?', true) }} · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_material') | default('?', true) }} · #{{ color | upper }}\n• Remaining: {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g · used {{ (state_attr('sensor.spoolman_spool_' ~ ns.id, 'used_weight') | float(0)) | round(1) }} g ({{ (state_attr('sensor.spoolman_spool_' ~ ns.id, 'used_percentage') | float(0)) | round(1) }}%)\n• Remaining length: {{ ((state_attr('sensor.spoolman_spool_' ~ ns.id, 'remaining_length') | float(0)) / 1000) | round(1) }} m · used {{ ((state_attr('sensor.spoolman_spool_' ~ ns.id, 'used_length') | float(0)) / 1000) | round(1) }} m\n• Spool: Ø{{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_diameter') | default('?', true) }} mm · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_density') | default('?', true) }} g/cm³ · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_weight') | default('?', true) }} g · art. {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_article_number') | default('?', true) }}\n• Temps: bed {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_settings_bed_temp') | default('?', true) }}°C · hotend {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_settings_extruder_temp') | default('?', true) }}°C\n• Flow: {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_flow_rate') }} · Runout est.: {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_estimated_runout') }}\n• Registered: {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'registered') | default('?', true) }} · Location: {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'location') | default('?', true) }} · Price: {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_price') | default('?', true) }}{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}",
"multiline_secondary": true,
"grid_options": {
"columns": "full"
}
"type": "custom:mushroom-template-card"
},
{
"type": "custom:mushroom-template-card",
"entity": "sensor.sparkx_i7_cfs_box_1_slot_2_color",
"name": "Slot 2",
"grid_options": {
"columns": "full"
},
"icon": "mdi:spool",
"icon_color": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_2_color') | replace('#', '') | lower %}{% if c | length == 6 %}#{{ c }}{% else %}var(--primary-color){% endif %}",
"multiline_secondary": true,
"name": "Slot 2",
"picture": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_2_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'entity_picture') if ns.id and state_attr('sensor.spoolman_spool_' ~ ns.id, 'entity_picture') else '' }}",
"primary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_2_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}Spool {{ ns.id }} · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_name') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}Slot color unavailable{% else %}No spool with stock matches this color{% endif %}",
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_2_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}• {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_vendor_name') | default('?', true) }} · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_material') | default('?', true) }} · #{{ color | upper }}\n• Remaining: {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g · used {{ (state_attr('sensor.spoolman_spool_' ~ ns.id, 'used_weight') | float(0)) | round(1) }} g ({{ (state_attr('sensor.spoolman_spool_' ~ ns.id, 'used_percentage') | float(0)) | round(1) }}%)\n• Remaining length: {{ ((state_attr('sensor.spoolman_spool_' ~ ns.id, 'remaining_length') | float(0)) / 1000) | round(1) }} m · used {{ ((state_attr('sensor.spoolman_spool_' ~ ns.id, 'used_length') | float(0)) / 1000) | round(1) }} m\n• Spool: Ø{{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_diameter') | default('?', true) }} mm · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_density') | default('?', true) }} g/cm³ · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_weight') | default('?', true) }} g · art. {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_article_number') | default('?', true) }}\n• Temps: bed {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_settings_bed_temp') | default('?', true) }}°C · hotend {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_settings_extruder_temp') | default('?', true) }}°C\n• Flow: {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_flow_rate') }} · Runout est.: {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_estimated_runout') }}\n• Registered: {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'registered') | default('?', true) }} · Location: {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'location') | default('?', true) }} · Price: {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_price') | default('?', true) }}{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}",
"multiline_secondary": true,
"grid_options": {
"columns": "full"
}
"type": "custom:mushroom-template-card"
},
{
"type": "custom:mushroom-template-card",
"entity": "sensor.sparkx_i7_cfs_box_1_slot_3_color",
"name": "Slot 3",
"grid_options": {
"columns": "full"
},
"icon": "mdi:spool",
"icon_color": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_3_color') | replace('#', '') | lower %}{% if c | length == 6 %}#{{ c }}{% else %}var(--primary-color){% endif %}",
"multiline_secondary": true,
"name": "Slot 3",
"picture": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_3_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'entity_picture') if ns.id and state_attr('sensor.spoolman_spool_' ~ ns.id, 'entity_picture') else '' }}",
"primary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_3_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}Spool {{ ns.id }} · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_name') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}Slot color unavailable{% else %}No spool with stock matches this color{% endif %}",
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_3_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}• {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_vendor_name') | default('?', true) }} · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_material') | default('?', true) }} · #{{ color | upper }}\n• Remaining: {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g · used {{ (state_attr('sensor.spoolman_spool_' ~ ns.id, 'used_weight') | float(0)) | round(1) }} g ({{ (state_attr('sensor.spoolman_spool_' ~ ns.id, 'used_percentage') | float(0)) | round(1) }}%)\n• Remaining length: {{ ((state_attr('sensor.spoolman_spool_' ~ ns.id, 'remaining_length') | float(0)) / 1000) | round(1) }} m · used {{ ((state_attr('sensor.spoolman_spool_' ~ ns.id, 'used_length') | float(0)) / 1000) | round(1) }} m\n• Spool: Ø{{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_diameter') | default('?', true) }} mm · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_density') | default('?', true) }} g/cm³ · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_weight') | default('?', true) }} g · art. {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_article_number') | default('?', true) }}\n• Temps: bed {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_settings_bed_temp') | default('?', true) }}°C · hotend {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_settings_extruder_temp') | default('?', true) }}°C\n• Flow: {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_flow_rate') }} · Runout est.: {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_estimated_runout') }}\n• Registered: {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'registered') | default('?', true) }} · Location: {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'location') | default('?', true) }} · Price: {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_price') | default('?', true) }}{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}",
"multiline_secondary": true,
"grid_options": {
"columns": "full"
}
"type": "custom:mushroom-template-card"
},
{
"type": "custom:mushroom-template-card",
"entity": "sensor.sparkx_i7_cfs_box_1_slot_4_color",
"name": "Slot 4",
"grid_options": {
"columns": "full"
},
"icon": "mdi:spool",
"icon_color": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_4_color') | replace('#', '') | lower %}{% if c | length == 6 %}#{{ c }}{% else %}var(--primary-color){% endif %}",
"multiline_secondary": true,
"name": "Slot 4",
"picture": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_4_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'entity_picture') if ns.id and state_attr('sensor.spoolman_spool_' ~ ns.id, 'entity_picture') else '' }}",
"primary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_4_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}Spool {{ ns.id }} · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_name') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}Slot color unavailable{% else %}No spool with stock matches this color{% endif %}",
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_4_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}• {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_vendor_name') | default('?', true) }} · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_material') | default('?', true) }} · #{{ color | upper }}\n• Remaining: {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g · used {{ (state_attr('sensor.spoolman_spool_' ~ ns.id, 'used_weight') | float(0)) | round(1) }} g ({{ (state_attr('sensor.spoolman_spool_' ~ ns.id, 'used_percentage') | float(0)) | round(1) }}%)\n• Remaining length: {{ ((state_attr('sensor.spoolman_spool_' ~ ns.id, 'remaining_length') | float(0)) / 1000) | round(1) }} m · used {{ ((state_attr('sensor.spoolman_spool_' ~ ns.id, 'used_length') | float(0)) / 1000) | round(1) }} m\n• Spool: Ø{{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_diameter') | default('?', true) }} mm · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_density') | default('?', true) }} g/cm³ · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_weight') | default('?', true) }} g · art. {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_article_number') | default('?', true) }}\n• Temps: bed {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_settings_bed_temp') | default('?', true) }}°C · hotend {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_settings_extruder_temp') | default('?', true) }}°C\n• Flow: {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_flow_rate') }} · Runout est.: {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_estimated_runout') }}\n• Registered: {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'registered') | default('?', true) }} · Location: {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'location') | default('?', true) }} · Price: {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_price') | default('?', true) }}{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}",
"multiline_secondary": true,
"grid_options": {
"columns": "full"
}
"type": "custom:mushroom-template-card"
}
]
],
"type": "grid"
},
{
"type": "grid",
"cards": [
{
"type": "heading",
"heading": "Adjust Remaining",
"icon": "mdi:pencil-outline"
"icon": "mdi:pencil-outline",
"type": "heading"
},
{
"type": "entities",
"title": "Set value (g)",
"show_header_toggle": false,
"entities": [
"input_number.spoolman_set_remaining"
],
"grid_options": {
"columns": "full"
}
},
"show_header_toggle": false,
"title": "Set value (g)",
"type": "entities"
},
{
"type": "tile",
"entity": "input_number.spoolman_set_remaining",
"name": "Apply to Slot 1",
"icon": "mdi:content-save-outline",
"grid_options": {
"columns": 3
},
"icon": "mdi:content-save-outline",
"name": "Apply to Slot 1",
"tap_action": {
"action": "perform-action",
"perform_action": "script.spoolman_set_spool_remaining",
"confirmation": {
"text": "Overwrite remaining weight of the spool matching Slot 1 (by color hex) in Spoolman?"
},
"data": {
"slot": 1
},
"confirmation": {
"text": "Overwrite remaining weight of the spool matching Slot 1 (by color hex) in Spoolman?"
}
}
"perform_action": "script.spoolman_set_spool_remaining"
},
"type": "tile"
},
{
"type": "tile",
"entity": "input_number.spoolman_set_remaining",
"name": "Apply to Slot 2",
"icon": "mdi:content-save-outline",
"grid_options": {
"columns": 3
},
"icon": "mdi:content-save-outline",
"name": "Apply to Slot 2",
"tap_action": {
"action": "perform-action",
"perform_action": "script.spoolman_set_spool_remaining",
"confirmation": {
"text": "Overwrite remaining weight of the spool matching Slot 2 (by color hex) in Spoolman?"
},
"data": {
"slot": 2
},
"confirmation": {
"text": "Overwrite remaining weight of the spool matching Slot 2 (by color hex) in Spoolman?"
}
}
"perform_action": "script.spoolman_set_spool_remaining"
},
"type": "tile"
},
{
"type": "tile",
"entity": "input_number.spoolman_set_remaining",
"name": "Apply to Slot 3",
"icon": "mdi:content-save-outline",
"grid_options": {
"columns": 3
},
"icon": "mdi:content-save-outline",
"name": "Apply to Slot 3",
"tap_action": {
"action": "perform-action",
"perform_action": "script.spoolman_set_spool_remaining",
"confirmation": {
"text": "Overwrite remaining weight of the spool matching Slot 3 (by color hex) in Spoolman?"
},
"data": {
"slot": 3
},
"confirmation": {
"text": "Overwrite remaining weight of the spool matching Slot 3 (by color hex) in Spoolman?"
}
}
"perform_action": "script.spoolman_set_spool_remaining"
},
"type": "tile"
},
{
"type": "tile",
"entity": "input_number.spoolman_set_remaining",
"name": "Apply to Slot 4",
"icon": "mdi:content-save-outline",
"grid_options": {
"columns": 3
},
"icon": "mdi:content-save-outline",
"name": "Apply to Slot 4",
"tap_action": {
"action": "perform-action",
"perform_action": "script.spoolman_set_spool_remaining",
"confirmation": {
"text": "Overwrite remaining weight of the spool matching Slot 4 (by color hex) in Spoolman?"
},
"data": {
"slot": 4
},
"confirmation": {
"text": "Overwrite remaining weight of the spool matching Slot 4 (by color hex) in Spoolman?"
}
}
"perform_action": "script.spoolman_set_spool_remaining"
},
"type": "tile"
},
{
"type": "markdown",
"content": "**1.** Type the new remaining grams above. **2.** Tap **Apply to Slot N** for the slot holding that roll — it resolves the spool by the slot's color hex, so it also works when the spool is exhausted (e.g. right after replacing a roll). **3.** The value is **absolute** — it replaces Spoolman's remaining weight; print deductions continue from there. Avoid adjusting during a running print.",
"grid_options": {
"columns": "full"
}
},
"type": "markdown"
}
]
],
"type": "grid"
},
{
"type": "grid",
"cards": [
{
"type": "heading",
"heading": "Print Linkage",
"icon": "mdi:printer-3d-nozzle"
"icon": "mdi:printer-3d-nozzle",
"type": "heading"
},
{
"type": "tile",
"entity": "automation.sparkx_i7_latch_print_spool_for_spoolman",
"name": "Latch + Segment Deduction",
"grid_options": {
"columns": 3
},
"icon": "mdi:link-variant",
"grid_options": {
"columns": 3
}
"name": "Latch + Segment Deduction",
"type": "tile"
},
{
"type": "tile",
"entity": "automation.sparkx_i7_deduct_filament_in_spoolman_on_print_complete",
"name": "Print Complete Deduction",
"grid_options": {
"columns": 3
},
"icon": "mdi:minus-circle-outline",
"grid_options": {
"columns": 3
}
"name": "Print Complete Deduction",
"type": "tile"
},
{
"type": "tile",
"entity": "sensor.sparkx_i7_filament_weight_estimated",
"name": "Current Job Weight (est.)",
"grid_options": {
"columns": 3
},
"icon": "mdi:weight-gram",
"grid_options": {
"columns": 3
}
"name": "Current Job Weight (est.)",
"type": "tile"
},
{
"type": "tile",
"entity": "input_number.sparkx_i7_filament_g_cm",
"name": "Filament g/cm",
"grid_options": {
"columns": 3
},
"icon": "mdi:ruler",
"grid_options": {
"columns": 3
}
"name": "Filament g/cm",
"type": "tile"
},
{
"type": "tile",
"entity": "sensor.sparkx_i7_active_filament_slot",
"name": "Active CFS Slot",
"icon": "mdi:palette-swatch-variant",
"grid_options": {
"columns": 3
}
},
"icon": "mdi:palette-swatch-variant",
"name": "Active CFS Slot",
"type": "tile"
},
{
"type": "tile",
"entity": "sensor.sparkx_i7_used_material_length",
"name": "Used Material Total (cm)",
"icon": "mdi:plus-minus",
"grid_options": {
"columns": 6,
"rows": 1
}
},
"icon": "mdi:plus-minus",
"name": "Used Material Total (cm)",
"type": "tile"
}
]
],
"type": "grid"
},
{
"type": "grid",
"cards": [
{
"type": "heading",
"heading": "Spool History — CFS Lite (auto)",
"icon": "mdi:history"
"icon": "mdi:history",
"type": "heading"
},
{
"type": "custom:auto-entities",
"card": {
"hours_to_show": 168,
"show_names": true,
"title": "Remaining weight (7 days)",
"type": "history-graph"
},
"filter": {
"include": [
{
"entity_id": "sensor.spoolman_spool_*",
"attributes": {
"location": "CFS Lite"
}
},
"entity_id": "sensor.spoolman_spool_*"
}
]
},
"sort": {
"method": "attribute",
"attribute": "id",
"numeric": true
},
"card": {
"type": "history-graph",
"title": "Remaining weight (7 days)",
"hours_to_show": 168,
"show_names": true
},
"show_empty": false,
"grid_options": {
"columns": "full"
}
},
"show_empty": false,
"sort": {
"attribute": "id",
"method": "attribute",
"numeric": true
},
"type": "custom:auto-entities"
},
{
"type": "markdown",
"content": "Every spool with location **CFS Lite** joins this graph automatically — register a new roll in Spoolman (same color hex, location CFS Lite) and it appears without dashboard edits. History follows the spool entity; a replaced roll keeps its own history under its own spool id.",
"grid_options": {
"columns": "full"
}
},
"type": "markdown"
}
]
],
"type": "grid"
}
]
],
"title": "Spoolman",
"type": "sections"
}
]
}
+13 -13
View File
@@ -4,7 +4,7 @@
"state": "ON",
"led_brightness": 100,
"countdown_to_turn_off": 0,
"voltage": 118.2,
"voltage": 119,
"countdown_to_turn_on": 0,
"ac_frequency": 60,
"power_factor": 0.11,
@@ -30,7 +30,7 @@
"power": 1.9,
"current": 0.09,
"energy": 56.31,
"power_factor": 0.17,
"power_factor": 0.18,
"update": {
"state": "idle",
"installed_version": 268513381,
@@ -45,10 +45,10 @@
"state": "ON",
"led_brightness": 100,
"countdown_to_turn_off": 0,
"voltage": 118.6,
"voltage": 118.3,
"countdown_to_turn_on": 0,
"energy": 108.83,
"power_factor": 0.2,
"power_factor": 0.91,
"ac_frequency": 60,
"update": {
"state": "idle",
@@ -58,8 +58,8 @@
"latest_release_notes": null
},
"linkquality": 145,
"power": 0.2,
"current": 0.01,
"power": 92.8,
"current": 0.9,
"power_on_behavior": "on"
},
"0xb40e060fffe031e3": {
@@ -74,11 +74,11 @@
"led_brightness": 100,
"countdown_to_turn_off": 0,
"countdown_to_turn_on": 0,
"voltage": 116.6,
"voltage": 117.6,
"state": "ON",
"ac_frequency": 60,
"energy": 221.03,
"power": 102,
"power": 96.5,
"current": 0.91,
"power_factor": 0.39,
"update": {
@@ -95,11 +95,11 @@
"led_brightness": 100,
"countdown_to_turn_off": 0,
"countdown_to_turn_on": 0,
"voltage": 118.3,
"voltage": 118.8,
"energy": 103.6,
"state": "ON",
"power": 32.3,
"current": 0.48,
"power": 27.7,
"current": 0.43,
"ac_frequency": 60,
"power_factor": 0.54,
"update": {
@@ -114,7 +114,7 @@
},
"0xffffb40e060895b3": {
"state": "ON",
"voltage": 118.3,
"voltage": 118.8,
"ac_frequency": 60,
"energy": 15.19,
"current": 0,
@@ -136,7 +136,7 @@
"0xffffb40e0608864e": {
"led_brightness": 100,
"countdown_to_turn_off": 0,
"voltage": 118.8,
"voltage": 119.3,
"energy": 36.92,
"countdown_to_turn_on": 0,
"state": "ON",