diff --git a/.ha_mcp/backups/dashboard.sparkx-i7.20261015_210217.yaml b/.ha_mcp/backups/dashboard.sparkx-i7.20261015_210217.yaml
new file mode 100644
index 00000000..bd7a3ec4
--- /dev/null
+++ b/.ha_mcp/backups/dashboard.sparkx-i7.20261015_210217.yaml
@@ -0,0 +1,1461 @@
+# ha_mcp_backup
+schema_version: 1
+domain: dashboard
+entity_id: sparkx-i7
+captured: '2026-10-15T21:02:17.916570+00:00'
+tool: ha_config_set_dashboard
+config:
+ views:
+ - max_columns: 4
+ path: print
+ sections:
+ - cards:
+ - bed: sensor.sparkx_i7_bed_temperature
+ camera: camera.sparkx_i7_printer_camera
+ grid_options:
+ columns: full
+ layer: sensor.sparkx_i7_working_layer
+ light: light.sparkx_i7_light
+ name: SparkX i7
+ nozzle: sensor.sparkx_i7_nozzle_temperature
+ pause_btn: button.sparkx_i7_pause_print
+ progress: sensor.sparkx_i7_print_progress
+ resume_btn: button.sparkx_i7_resume_print
+ status: sensor.sparkx_i7_print_status
+ stop_btn: button.sparkx_i7_stop_print
+ time_left: sensor.sparkx_i7_print_time_left
+ total_layers: sensor.sparkx_i7_total_layers
+ type: custom:k-printer-card
+ - grid_options:
+ columns: full
+ type: custom:webrtc-camera
+ ui: true
+ url: octoprint
+ - grid_options:
+ columns: full
+ type: custom:webrtc-camera
+ ui: true
+ url: octoprint2
+ - camera_image: camera.sparkx_i7_printer_camera
+ camera_view: live
+ entity: camera.sparkx_i7_printer_camera
+ fit_mode: cover
+ grid_options:
+ columns: full
+ show_name: true
+ show_state: true
+ type: picture-entity
+ - cards:
+ - grid_options:
+ columns: 6
+ image_entity: image.sparkx_i7_current_print_preview
+ show_name: false
+ type: picture
+ - entity: sensor.sparkx_i7_active_filament_slot
+ icon: mdi:palette
+ icon_color: '{% set color = state_attr(''sensor.sparkx_i7_active_filament_slot'',
+ ''color'') | default('''') | string %}{% set core = color | replace(''#'',
+ '''') %}{% if core | length >= 6 %}#{{ core[-6:] }}{% else %}var(--primary-text-color){%
+ endif %}'
+ multiline_secondary: true
+ name: Active Color
+ primary: '{% set slot = states(''sensor.sparkx_i7_active_filament_slot'')
+ %}{% if ''Slot 1'' in slot %}{{ states(''sensor.sparkx_i7_slot_1_color_name'')
+ }}{% elif ''Slot 2'' in slot %}{{ states(''sensor.sparkx_i7_slot_2_color_name'')
+ }}{% elif ''Slot 3'' in slot %}{{ states(''sensor.sparkx_i7_slot_3_color_name'')
+ }}{% elif ''Slot 4'' in slot %}{{ states(''sensor.sparkx_i7_slot_4_color_name'')
+ }}{% elif slot == ''External'' %}{{ states(''sensor.sparkx_i7_external_color_name'')
+ }}{% else %}Unknown{% endif %}'
+ secondary: "{% set slot = states('sensor.sparkx_i7_active_filament_slot')\
+ \ %}{{ slot }}{% if state_attr('sensor.sparkx_i7_active_filament_slot',\
+ \ 'filament') %} \xB7 {{ state_attr('sensor.sparkx_i7_active_filament_slot',\
+ \ 'filament') }}{% endif %}"
+ type: custom:mushroom-template-card
+ grid_options:
+ columns: full
+ type: horizontal-stack
+ - entity: sensor.sparkx_i7_print_status
+ grid_options:
+ columns: 12
+ icon: mdi:state-machine
+ name: Status
+ type: tile
+ - entity: sensor.sparkx_i7_position_z_2_decimals
+ grid_options:
+ columns: 4
+ icon: mdi:axis-z-arrow
+ name: Current Z
+ type: tile
+ - entity: sensor.sparkx_i7_position_x
+ grid_options:
+ columns: 4
+ icon: mdi:axis-x-arrow
+ name: X
+ type: tile
+ - entity: sensor.sparkx_i7_position_y
+ grid_options:
+ columns: 4
+ icon: mdi:axis-y-arrow
+ name: Y
+ type: tile
+ - entity: sensor.sparkx_i7_print_status
+ grid_options:
+ columns: 6
+ icon: mdi:message-alert-outline
+ multiline_secondary: true
+ name: Printer Message
+ primary: '{{ states("sensor.sparkx_i7_print_status") | replace("_", " ") |
+ title }}'
+ secondary: '{% set err = state_attr("sensor.sparkx_i7_print_status", "err")
+ or {} %}{% set code = err.get("errcode", 0) | int(0) %}{% set msg = err.get("value",
+ "") %}{% if state_attr("sensor.sparkx_i7_print_status", "paused_flag") |
+ default(false) %}Print paused{% elif msg %}ERROR {{ code }}: {{ msg }}{%
+ elif code %}Printer error {{ code }}{% else %}No printer error{% endif %}'
+ type: custom:mushroom-template-card
+ - entity: sensor.sparkx_i7_print_status
+ grid_options:
+ columns: 6
+ icon: mdi:file-document-outline
+ multiline_secondary: true
+ name: Current File
+ primary: Current File
+ secondary: '{% set file = state_attr("sensor.sparkx_i7_print_status", "file")
+ or "" %}{% if file %}{{ file.split("/")[-1] | replace(".gcode", "") }}{%
+ else %}No active file{% endif %}'
+ type: custom:mushroom-template-card
+ type: grid
+ - cards:
+ - heading: Print Progress
+ icon: mdi:progress-clock
+ type: heading
+ - entity: sensor.sparkx_i7_print_progress
+ grid_options:
+ columns: 6
+ rows: 3
+ max: 100
+ min: 0
+ name: Progress
+ severity:
+ green: 0
+ red: 90
+ yellow: 40
+ type: gauge
+ unit: '%'
+ - grid_options:
+ columns: 6
+ icon: mdi:clock-start
+ multiline_secondary: true
+ name: Elapsed
+ primary: Elapsed
+ secondary: '{% set s = states(''sensor.sparkx_i7_print_job_time'') | float(0)
+ %}{% set h = (s / 3600) | int %}{% set m = ((s % 3600) / 60) | int %}{%
+ if h %}{{ h }} hr {{ m }} min{% else %}{{ m }} min{% endif %}'
+ type: custom:mushroom-template-card
+ - grid_options:
+ columns: 6
+ icon: mdi:clock-end
+ multiline_secondary: true
+ name: Remaining
+ primary: Remaining
+ secondary: '{% set s = states(''sensor.sparkx_i7_print_time_left'') | float(-1)
+ %}{% if s <= 0 %}No estimate{% else %}{% set h = (s / 3600) | int %}{% set
+ m = ((s % 3600) / 60) | int %}{% if h %}{{ h }} hr {{ m }} min{% else %}{{
+ m }} min{% endif %}{% endif %}'
+ type: custom:mushroom-template-card
+ - grid_options:
+ columns: 6
+ icon: mdi:clock-outline
+ multiline_secondary: true
+ primary: Est. Finish
+ secondary: "{% set left = states('sensor.sparkx_i7_print_time_left') | int(0)\
+ \ %}{% if left > 0 %}{{ (now() + timedelta(seconds=left)).strftime('%I:%M\
+ \ %p').lstrip('0') }}{% else %}\u2014{% endif %}"
+ type: custom:mushroom-template-card
+ - grid_options:
+ columns: 6
+ icon: mdi:layers
+ multiline_secondary: true
+ name: Layer
+ primary: Layer
+ secondary: '{% set c = states(''sensor.sparkx_i7_working_layer'') | int(0)
+ %}{% set t = states(''sensor.sparkx_i7_total_layers'') | int(0) %}{{ c }}
+ of {{ t }}'
+ type: custom:mushroom-template-card
+ - entity: light.sparkx_i7_light
+ grid_options:
+ columns: 6
+ icon: mdi:lightbulb
+ name: Printer Light
+ type: tile
+ - detail: 1
+ entity: sensor.sparkx_i7_print_progress
+ graph: line
+ grid_options:
+ columns: full
+ hours_to_show: 24
+ name: Progress History
+ type: sensor
+ - entity: number.sparkx_i7_print_tuning
+ grid_options:
+ columns: 6
+ icon: mdi:speedometer
+ name: Print Tuning
+ type: tile
+ - entity: sensor.sparkx_i7_print_speed
+ grid_options:
+ columns: 6
+ icon: mdi:speedometer
+ name: Speed
+ type: tile
+ - entity: sensor.sparkx_i7_real_time_flow
+ grid_options:
+ columns: 6
+ icon: mdi:cube-send
+ name: Real-Time Flow
+ type: tile
+ - entity: sensor.sparkx_i7_flow_rate
+ grid_options:
+ columns: 6
+ icon: mdi:chart-gantt
+ name: Flow Rate
+ type: tile
+ - entity: sensor.sparkx_i7_current_object
+ grid_options:
+ columns: 6
+ icon: mdi:cube-outline
+ name: Object
+ type: tile
+ - entity: sensor.sparkx_i7_object_count
+ grid_options:
+ columns: 6
+ icon: mdi:counter
+ name: Object Count
+ type: tile
+ - entity: sensor.sparkx_moonraker_totals_print_time
+ features_position: bottom
+ name: Total Print
+ type: tile
+ vertical: false
+ type: grid
+ - cards:
+ - heading: Temperatures
+ icon: mdi:thermometer
+ type: heading
+ - entity: sensor.sparkx_i7_nozzle_temperature
+ grid_options:
+ columns: 4
+ max: 300
+ min: 0
+ name: Nozzle
+ severity:
+ green: 0
+ red: 240
+ yellow: 180
+ type: gauge
+ unit: "\xB0C"
+ - entity: sensor.sparkx_i7_bed_temperature
+ grid_options:
+ columns: 4
+ max: 100
+ min: 0
+ name: Bed
+ severity:
+ green: 0
+ red: 100
+ yellow: 60
+ type: gauge
+ unit: "\xB0C"
+ - entity: number.sparkx_i7_nozzle_target
+ grid_options:
+ columns: 6
+ icon: mdi:printer-3d-nozzle
+ name: Nozzle Target
+ type: tile
+ - entity: number.sparkx_i7_bed_target
+ grid_options:
+ columns: 6
+ icon: mdi:radiator
+ name: Bed Target
+ type: tile
+ - entities:
+ - color: '#ef5350'
+ entity: sensor.sparkx_i7_nozzle_temperature
+ name: Actual
+ - color: '#4caf50'
+ entity: number.sparkx_i7_nozzle_target
+ name: Target
+ expand_legend: true
+ grid_options:
+ columns: full
+ hours_to_show: 24
+ show_names: true
+ title: Nozzle Temperature
+ type: history-graph
+ - entities:
+ - color: '#42a5f5'
+ entity: sensor.sparkx_i7_bed_temperature
+ name: Actual
+ - color: '#4caf50'
+ entity: number.sparkx_i7_bed_target
+ name: Target
+ expand_legend: true
+ grid_options:
+ columns: full
+ hours_to_show: 24
+ show_names: true
+ title: Bed Temperature
+ type: history-graph
+ - all_series_config:
+ show:
+ name_in_header: true
+ stroke_width: 2
+ apex_config:
+ chart:
+ height: 200
+ legend:
+ show: false
+ grid:
+ xaxis:
+ borderColor: '#555'
+ lines:
+ show: true
+ yaxis:
+ - decimals: 0
+ opposite: true
+ tickAmount: 2
+ graph_span: 1h
+ grid_options:
+ columns: full
+ header:
+ colorize_states: true
+ show: true
+ show_states: true
+ title: Fan Speeds
+ series:
+ - entity: sensor.sparkx_moonraker_hotend_fan
+ name: Hotend
+ type: custom:apexcharts-card
+ type: grid
+ - cards:
+ - heading: Controls
+ icon: mdi:gesture-tap-button
+ type: heading
+ - entity: button.sparkx_i7_pause_print
+ grid_options:
+ columns: 4
+ icon: mdi:pause
+ name: Pause
+ tap_action:
+ action: perform-action
+ perform_action: button.press
+ target:
+ entity_id: button.sparkx_i7_pause_print
+ type: tile
+ - entity: button.sparkx_i7_resume_print
+ grid_options:
+ columns: 4
+ icon: mdi:play
+ name: Resume
+ tap_action:
+ action: perform-action
+ perform_action: button.press
+ target:
+ entity_id: button.sparkx_i7_resume_print
+ type: tile
+ - entity: button.sparkx_i7_reconnect
+ grid_options:
+ columns: 4
+ icon: mdi:lan-connect
+ name: Connect
+ tap_action:
+ action: perform-action
+ perform_action: button.press
+ target:
+ entity_id: button.sparkx_i7_reconnect
+ type: tile
+ - entity: button.sparkx_i7_stop_print
+ grid_options:
+ columns: 4
+ icon: mdi:cancel
+ name: Cancel Print
+ tap_action:
+ action: perform-action
+ perform_action: button.press
+ target:
+ entity_id: button.sparkx_i7_stop_print
+ type: tile
+ - entity: button.sparkx_i7_home_xy_then_z
+ grid_options:
+ columns: 4
+ icon: mdi:home-circle
+ name: Home
+ tap_action:
+ action: perform-action
+ perform_action: button.press
+ target:
+ entity_id: button.sparkx_i7_home_xy_then_z
+ type: tile
+ type: grid
+ - cards:
+ - heading: Filament
+ icon: mdi:printer-3d-nozzle-outline
+ type: heading
+ - entity: sensor.sparkx_i7_filament_weight_estimated
+ grid_options:
+ columns: 6
+ icon: '{% set st = states(''sensor.sparkx_i7_print_status'') %}{% if st in
+ [''printing'', ''paused''] %}mdi:printer-3d-nozzle{% else %}mdi:calendar-today{%
+ endif %}'
+ multiline_secondary: true
+ name: Filament Used
+ primary: '{% set st = states(''sensor.sparkx_i7_print_status'') %}{% if st
+ in [''printing'', ''paused''] %}{{ states(''sensor.sparkx_i7_filament_weight_estimated'')
+ | round(1) }} g{% else %}Last job: {{ states(''input_number.sparkx_i7_last_job_filament_weight'')
+ | round(1) }} g{% endif %}'
+ secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}{% if st\
+ \ in ['printing', 'paused'] %}{{ states('sensor.sparkx_i7_used_material_length')\
+ \ | round(0) }} cm this job{% else %}{{ states('sensor.sparkx_i7_filament_weight_daily')\
+ \ | round(1) }} g \xB7 {{ states('sensor.sparkx_i7_filament_cost_daily')\
+ \ | round(2) }} $ today{% endif %}"
+ type: custom:mushroom-template-card
+ - entity: input_number.sparkx_i7_filament_g_cm
+ grid_options:
+ columns: 6
+ icon: mdi:weight-kilogram
+ name: g/cm
+ type: tile
+ - entity: sensor.sparkx_i7_used_material_length
+ grid_options:
+ columns: 6
+ icon: mdi:counter
+ multiline_secondary: true
+ name: Used Length
+ primary: '{% set st = states(''sensor.sparkx_i7_print_status'') %}{% if st
+ in [''printing'', ''paused''] %}{{ states(''sensor.sparkx_i7_used_material_length'')
+ | round(0) }} cm{% else %}{{ (states(''sensor.sparkx_i7_filament_weight_daily'')
+ | float(0) / states(''input_number.sparkx_i7_filament_g_cm'') | float(0.0298))
+ | round(0) }} cm{% endif %}'
+ secondary: '{% set st = states(''sensor.sparkx_i7_print_status'') %}{% if
+ st in [''printing'', ''paused''] %}this job (printer-reported){% else %}today,
+ from today''s weight{% endif %}'
+ type: custom:mushroom-template-card
+ - entity: input_number.sparkx_i7_last_job_cost
+ grid_options:
+ columns: 6
+ icon: mdi:cash
+ 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
+ %}'
+ type: custom:mushroom-template-card
+ - entity: sensor.sparkx_i7_filament_cost_daily
+ grid_options:
+ columns: 3
+ icon: mdi:cash-multiple
+ name: Today
+ type: tile
+ - entity: sensor.sparkx_i7_filament_cost_weekly
+ grid_options:
+ columns: 3
+ icon: mdi:cash-multiple
+ name: This Week
+ type: tile
+ - entity: sensor.sparkx_i7_filament_cost_monthly
+ grid_options:
+ columns: 3
+ icon: mdi:cash-multiple
+ name: This Month
+ type: tile
+ type: grid
+ title: Print
+ type: sections
+ - icon: mdi:printer-3d-nozzle-outline
+ max_columns: 4
+ path: cfs-fans
+ sections:
+ - cards:
+ - heading: CFS Box 1
+ icon: mdi:file-cabinet
+ type: heading
+ - entity: sensor.sparkx_i7_cfs_box_1_temperature
+ grid_options:
+ columns: 6
+ icon: mdi:thermometer
+ name: Temperature
+ type: tile
+ - entity: sensor.sparkx_i7_cfs_box_1_humidity
+ grid_options:
+ columns: 6
+ icon: mdi:water-percent
+ name: Humidity
+ type: tile
+ - grid_options:
+ columns: 6
+ icon: mdi:printer-3d-nozzle
+ icon_color: '{% set c = states(''sensor.sparkx_i7_cfs_box_1_slot_1_color'')|default('''')|string
+ %}{% set core = c|replace(''#'','''') %}{% if core|length >= 6 %}#{{ core[-6:]
+ }}{% endif %}'
+ 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') %}{%\
+ \ 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 (state_attr(e[:-10],\
+ \ 'location') | default('', true) | lower) == 'cfs lite 1' %}{% 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 }} \xB7 {% 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
+ - grid_options:
+ columns: 6
+ icon: mdi:printer-3d-nozzle
+ icon_color: '{% set c = states(''sensor.sparkx_i7_cfs_box_1_slot_2_color'')|default('''')|string
+ %}{% set core = c|replace(''#'','''') %}{% if core|length >= 6 %}#{{ core[-6:]
+ }}{% endif %}'
+ multiline_secondary: true
+ name: Slot 2
+ primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_2_filament'') }}'
+ secondary: "{% set col = states('sensor.sparkx_i7_slot_2_color_name') %}{%\
+ \ set color = states('sensor.sparkx_i7_cfs_box_1_slot_2_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 (state_attr(e[:-10],\
+ \ 'location') | default('', true) | lower) == 'cfs lite 2' %}{% 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 }} \xB7 {% 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
+ - grid_options:
+ columns: 6
+ icon: mdi:printer-3d-nozzle
+ icon_color: '{% set c = states(''sensor.sparkx_i7_cfs_box_1_slot_3_color'')|default('''')|string
+ %}{% set core = c|replace(''#'','''') %}{% if core|length >= 6 %}#{{ core[-6:]
+ }}{% endif %}'
+ multiline_secondary: true
+ name: Slot 3
+ primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_3_filament'') }}'
+ secondary: "{% set col = states('sensor.sparkx_i7_slot_3_color_name') %}{%\
+ \ set color = states('sensor.sparkx_i7_cfs_box_1_slot_3_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 (state_attr(e[:-10],\
+ \ 'location') | default('', true) | lower) == 'cfs lite 3' %}{% 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 }} \xB7 {% 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
+ - grid_options:
+ columns: 6
+ icon: mdi:printer-3d-nozzle
+ icon_color: '{% set c = states(''sensor.sparkx_i7_cfs_box_1_slot_4_color'')|default('''')|string
+ %}{% set core = c|replace(''#'','''') %}{% if core|length >= 6 %}#{{ core[-6:]
+ }}{% endif %}'
+ multiline_secondary: true
+ name: Slot 4
+ primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_4_filament'') }}'
+ secondary: "{% set col = states('sensor.sparkx_i7_slot_4_color_name') %}{%\
+ \ set color = states('sensor.sparkx_i7_cfs_box_1_slot_4_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 (state_attr(e[:-10],\
+ \ 'location') | default('', true) | lower) == 'cfs lite 4' %}{% 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 }} \xB7 {% 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
+ type: grid
+ - cards:
+ - heading: External / Active
+ icon: mdi:printer-3d
+ type: heading
+ - cards:
+ - entity: sensor.sparkx_i7_active_filament_slot
+ grid_options:
+ columns: 6
+ icon: mdi:swap-horizontal
+ name: Active Slot
+ type: tile
+ - entity: sensor.sparkx_i7_active_filament_slot
+ icon: mdi:palette
+ icon_color: '{% set color = state_attr(''sensor.sparkx_i7_active_filament_slot'',
+ ''color'') | default('''') | string %}{% set core = color | replace(''#'',
+ '''') %}{% if core | length >= 6 %}#{{ core[-6:] }}{% else %}var(--primary-text-color){%
+ endif %}'
+ multiline_secondary: true
+ name: Active Color
+ primary: '{% set slot = states(''sensor.sparkx_i7_active_filament_slot'')
+ %}{% if ''Slot 1'' in slot %}{{ states(''sensor.sparkx_i7_slot_1_color_name'')
+ }}{% elif ''Slot 2'' in slot %}{{ states(''sensor.sparkx_i7_slot_2_color_name'')
+ }}{% elif ''Slot 3'' in slot %}{{ states(''sensor.sparkx_i7_slot_3_color_name'')
+ }}{% elif ''Slot 4'' in slot %}{{ states(''sensor.sparkx_i7_slot_4_color_name'')
+ }}{% elif slot == ''External'' %}{{ states(''sensor.sparkx_i7_external_color_name'')
+ }}{% else %}Unknown{% endif %}'
+ secondary: "{% set slot = states('sensor.sparkx_i7_active_filament_slot')\
+ \ %}{{ slot }}{% if state_attr('sensor.sparkx_i7_active_filament_slot',\
+ \ 'filament') %} \xB7 {{ state_attr('sensor.sparkx_i7_active_filament_slot',\
+ \ 'filament') }}{% endif %}"
+ type: custom:mushroom-template-card
+ grid_options:
+ columns: full
+ type: horizontal-stack
+ - grid_options:
+ columns: 6
+ icon: mdi:lan-outline
+ icon_color: '{% set c = states(''sensor.sparkx_i7_cfs_external_color'')|default('''')|string
+ %}{% set core = c|replace(''#'','''') %}{% if core|length >= 6 %}#{{ core[-6:]
+ }}{% endif %}'
+ multiline_secondary: true
+ name: External Filament
+ primary: '{{ states(''sensor.sparkx_i7_cfs_external_filament'') }}'
+ secondary: "{% set col = states('sensor.sparkx_i7_external_color_name') %}{%\
+ \ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_external_remaining')\
+ \ }}% left"
+ type: custom:mushroom-template-card
+ - entity: sensor.sparkx_i7_filament_status
+ grid_options:
+ columns: 6
+ icon: mdi:printer-3d-nozzle-alert
+ name: Filament Status
+ type: tile
+ type: grid
+ - cards:
+ - heading: Fans
+ icon: mdi:fan
+ type: heading
+ - entity: fan.sparkx_i7_model_fan
+ features:
+ - type: fan-speed
+ grid_options:
+ columns: 4
+ icon: mdi:fan
+ name: Model Fan
+ type: tile
+ - entity: fan.sparkx_i7_case_fan
+ features:
+ - type: fan-speed
+ grid_options:
+ columns: 4
+ icon: mdi:fan
+ name: Case Fan
+ type: tile
+ - entity: fan.sparkx_i7_side_fan
+ features:
+ - type: fan-speed
+ grid_options:
+ columns: 4
+ icon: mdi:fan
+ name: Side Fan
+ type: tile
+ type: grid
+ title: CFS / Fans
+ type: sections
+ - icon: mdi:package-variant-closed
+ max_columns: 4
+ path: spoolman
+ sections:
+ - cards:
+ - heading: "CFS Slots \u2014 per-color deduction"
+ icon: mdi:printer-filament
+ type: heading
+ - card:
+ columns: 4
+ square: false
+ type: grid
+ card_param: cards
+ filter:
+ template: "{% set ns = namespace(cards=[]) %}\n{% for n in [1, 2, 3, 4]\
+ \ %}\n {% set sp = namespace(ent='') %}\n {% for s in states.sensor\
+ \ %}\n {% if sp.ent == '' and s.entity_id.startswith('sensor.spoolman_spool_')\
+ \ %}\n {% set loc = (s.attributes.location | default('')) | lower\
+ \ %}\n {% if loc == ('cfs lite ' ~ n) %}\n {% set sp.ent =\
+ \ s.entity_id %}\n {% endif %}\n {% endif %}\n {% endfor %}\n\
+ \ {% set v = namespace(html='', label='Slot ' ~ n, border='transparent',\
+ \ wrap='') %}\n {% if sp.ent != '' %}\n {% set hex = state_attr(sp.ent,\
+ \ 'filament_color_hex') | default('44739e') %}\n {% set hex_clean =\
+ \ hex if hex.startswith('#') else '#' ~ hex %}\n {% set remain = (state_attr(sp.ent,\
+ \ 'remaining_weight') | default(states(sp.ent)) | float(0)) | round(1)\
+ \ %}\n {% set total = state_attr(sp.ent, 'filament_weight') | float(1000)\
+ \ %}\n {% set raw_pct = ((remain / total) * 100) | round(1) if total\
+ \ > 0 else 0 %}\n {% set pct = 0 if raw_pct < 0 else (100 if raw_pct\
+ \ > 100 else raw_pct) %}\n {% set rem_n = states(sp.ent) | float(-1)\
+ \ %}\n {% set band = 2 if (rem_n >= 0 and rem_n < 25) else (1 if (rem_n\
+ \ >= 0 and rem_n < 100) else 0) %}\n {% set v.wrap = ' warn-crit' if\
+ \ band == 2 else (' warn-low' if band == 1 else '') %}\n {% set v.border\
+ \ = '#d0d0d0' if hex_clean | lower in ['#ffffff', '#fff'] else 'transparent'\
+ \ %}\n {% set v.html = \"
\" %}\n \
+ \ {% set v.label = 'Slot ' ~ n ~ (' \u26A0' if band > 0 else '') %}\n\
+ \ {% else %}\n {% set v.html = \"\"\
+ \ %}\n {% set v.label = \"Slot \" ~ n ~ \"\
+ \ \u2014 empty\" %}\n {% endif %}\n {% set card = {\n \"type\"\
+ : \"custom:button-card\",\n \"entity\": sp.ent if sp.ent != '' else\
+ \ 'sensor.sparkx_i7_active_filament_slot',\n \"show_icon\": false,\n\
+ \ \"show_state\": false,\n \"show_name\": false,\n \"custom_fields\"\
+ : {\n \"tube\": \"\" ~ v.html\
+ \ ~ \"
\" ~ v.label ~ \"
\"\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 {\"flex-direction\": \"column\"},\n {\"align-items\"\
+ : \"center\"}\n ]\n }\n },\n \"extra_styles\": \"\n\
+ \ .tube-wrap {\n display: flex;\n flex-direction: column;\n\
+ \ align-items: center;\n width: 100%;\n }\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 \" ~ v.border ~\
+ \ \";\n display: flex;\n flex-direction: column;\n \
+ \ justify-content: flex-end;\n }\n .tube-empty {\n \
+ \ background: transparent;\n border: 2px dashed var(--error-color);\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 .slot-label {\n margin-top:\
+ \ 8px;\n font-size: 12px;\n font-weight: 700;\n letter-spacing:\
+ \ 0.3px;\n color: var(--secondary-text-color);\n }\n \
+ \ .slot-warn {\n color: var(--error-color);\n }\n .warn-low\
+ \ .tube-bg {\n background-color: #fff6df;\n outline: 2px\
+ \ solid var(--warning-color);\n }\n .warn-low .slot-label {\n\
+ \ color: var(--warning-color);\n }\n .warn-crit .tube-bg\
+ \ {\n background-color: #fdecea;\n outline: 2px solid var(--error-color);\n\
+ \ }\n .warn-crit .slot-label {\n color: var(--error-color);\n\
+ \ }\n \",\n \"tap_action\": {\n \"action\": \"more-info\"\
+ \ if sp.ent != '' else \"none\"\n }\n } %}\n\n {% set ns.cards =\
+ \ ns.cards + [card] %}\n{% endfor %}\n{{ ns.cards }}\n"
+ type: custom:auto-entities
+ - entity: sensor.sparkx_i7_cfs_box_1_slot_1_color
+ 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 = '''' %}{{ ''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\
+ \ (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs\
+ \ lite 1' %}{% 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 %}\u2022 Spool {{ ns.id }} \xB7 {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_vendor') | default('?', true) }} \xB7 {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_material') | default('?', true) }} \xB7 {{ (states('sensor.spoolman_spool_'\
+ \ ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown',\
+ \ 'unavailable'] %}\u2022 Slot color unavailable{% else %}\u2022 No spool\
+ \ with stock matches this color{% endif %}\n{% if states('sensor.sparkx_i7_print_status')\
+ \ in ['printing', 'paused'] %}{% set gcm = states('input_number.sparkx_i7_filament_g_cm')\
+ \ | float(0.0298) %}{% set cur = states('sensor.sparkx_i7_used_material_length')\
+ \ | float(0) %}{% set ck = states('input_number.sparkx_i7_spoolman_length_checkpoint')\
+ \ | float(0) %}{% set booked = states('input_number.sparkx_i7_slot_1_grams')\
+ \ | float(0) %}{% set live = booked + ((([cur - ck, 0] | max) * gcm) if\
+ \ states('sensor.sparkx_i7_active_filament_slot') == 'box_1_slot_1' else\
+ \ 0) %}\u2022 This print so far: {{ live | round(1) }} g{% else %}\u2022\
+ \ Last print: {{ (states('input_number.sparkx_i7_slot_1_grams') | float(0))\
+ \ | round(1) }} g{% endif %}"
+ type: custom:mushroom-template-card
+ - entity: sensor.sparkx_i7_cfs_box_1_slot_2_color
+ grid_options:
+ columns: full
+ 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 = '''' %}{{ ''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\
+ \ (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs\
+ \ lite 2' %}{% 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 %}\u2022 Spool {{ ns.id }} \xB7 {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_vendor') | default('?', true) }} \xB7 {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_material') | default('?', true) }} \xB7 {{ (states('sensor.spoolman_spool_'\
+ \ ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown',\
+ \ 'unavailable'] %}\u2022 Slot color unavailable{% else %}\u2022 No spool\
+ \ with stock matches this color{% endif %}\n{% if states('sensor.sparkx_i7_print_status')\
+ \ in ['printing', 'paused'] %}{% set gcm = states('input_number.sparkx_i7_filament_g_cm')\
+ \ | float(0.0298) %}{% set cur = states('sensor.sparkx_i7_used_material_length')\
+ \ | float(0) %}{% set ck = states('input_number.sparkx_i7_spoolman_length_checkpoint')\
+ \ | float(0) %}{% set booked = states('input_number.sparkx_i7_slot_2_grams')\
+ \ | float(0) %}{% set live = booked + ((([cur - ck, 0] | max) * gcm) if\
+ \ states('sensor.sparkx_i7_active_filament_slot') == 'box_1_slot_2' else\
+ \ 0) %}\u2022 This print so far: {{ live | round(1) }} g{% else %}\u2022\
+ \ Last print: {{ (states('input_number.sparkx_i7_slot_2_grams') | float(0))\
+ \ | round(1) }} g{% endif %}"
+ type: custom:mushroom-template-card
+ - entity: sensor.sparkx_i7_cfs_box_1_slot_3_color
+ grid_options:
+ columns: full
+ 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 = '''' %}{{ ''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\
+ \ (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs\
+ \ lite 3' %}{% 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 %}\u2022 Spool {{ ns.id }} \xB7 {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_vendor') | default('?', true) }} \xB7 {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_material') | default('?', true) }} \xB7 {{ (states('sensor.spoolman_spool_'\
+ \ ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown',\
+ \ 'unavailable'] %}\u2022 Slot color unavailable{% else %}\u2022 No spool\
+ \ with stock matches this color{% endif %}\n{% if states('sensor.sparkx_i7_print_status')\
+ \ in ['printing', 'paused'] %}{% set gcm = states('input_number.sparkx_i7_filament_g_cm')\
+ \ | float(0.0298) %}{% set cur = states('sensor.sparkx_i7_used_material_length')\
+ \ | float(0) %}{% set ck = states('input_number.sparkx_i7_spoolman_length_checkpoint')\
+ \ | float(0) %}{% set booked = states('input_number.sparkx_i7_slot_3_grams')\
+ \ | float(0) %}{% set live = booked + ((([cur - ck, 0] | max) * gcm) if\
+ \ states('sensor.sparkx_i7_active_filament_slot') == 'box_1_slot_3' else\
+ \ 0) %}\u2022 This print so far: {{ live | round(1) }} g{% else %}\u2022\
+ \ Last print: {{ (states('input_number.sparkx_i7_slot_3_grams') | float(0))\
+ \ | round(1) }} g{% endif %}"
+ type: custom:mushroom-template-card
+ - entity: sensor.sparkx_i7_cfs_box_1_slot_4_color
+ grid_options:
+ columns: full
+ 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 = '''' %}{{ ''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\
+ \ (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs\
+ \ lite 4' %}{% 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 %}\u2022 Spool {{ ns.id }} \xB7 {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_vendor') | default('?', true) }} \xB7 {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_material') | default('?', true) }} \xB7 {{ (states('sensor.spoolman_spool_'\
+ \ ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown',\
+ \ 'unavailable'] %}\u2022 Slot color unavailable{% else %}\u2022 No spool\
+ \ with stock matches this color{% endif %}\n{% if states('sensor.sparkx_i7_print_status')\
+ \ in ['printing', 'paused'] %}{% set gcm = states('input_number.sparkx_i7_filament_g_cm')\
+ \ | float(0.0298) %}{% set cur = states('sensor.sparkx_i7_used_material_length')\
+ \ | float(0) %}{% set ck = states('input_number.sparkx_i7_spoolman_length_checkpoint')\
+ \ | float(0) %}{% set booked = states('input_number.sparkx_i7_slot_4_grams')\
+ \ | float(0) %}{% set live = booked + ((([cur - ck, 0] | max) * gcm) if\
+ \ states('sensor.sparkx_i7_active_filament_slot') == 'box_1_slot_4' else\
+ \ 0) %}\u2022 This print so far: {{ live | round(1) }} g{% else %}\u2022\
+ \ Last print: {{ (states('input_number.sparkx_i7_slot_4_grams') | float(0))\
+ \ | round(1) }} g{% endif %}"
+ 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
+ icon: mdi:ruler-measure
+ name: Length Checkpoint (cm)
+ type: tile
+ - entity: input_text.sparkx_i7_print_spool_latch
+ grid_options:
+ columns: full
+ icon: mdi:link-variant
+ name: Latched CFS Slot
+ type: tile
+ - entity: sensor.sparkx_i7_used_material_length
+ grid_options:
+ columns: full
+ icon: mdi:plus-minus
+ name: Used Material Total (cm)
+ type: tile
+ - entity: sensor.sparkx_i7_filament_weight_estimated
+ grid_options:
+ columns: 12
+ rows: 1
+ icon: mdi:weight-gram
+ name: Current Job Weight (est.)
+ type: tile
+ - entity: sensor.sparkx_i7_active_filament_slot
+ 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 (state_attr(e[:-10], 'location')\
+ \ | default('', true) | lower) == ('cfs lite ' ~ slot.split('_')[-1]) %}{%\
+ \ 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 }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_filament_name') }} \xB7 {{ (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 }} \u2014 no\
+ \ spool with stock{% endif %}"
+ type: custom:mushroom-template-card
+ - 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 whose **location** is that\
+ \ slot's name \u2014 `CFS Lite 1` \u2026 `CFS Lite 4`. Colour is no longer\
+ \ used to pick the spool, so two identical black rolls stay distinct.\n\n\
+ **Replaced a roll?** Put the new roll in that slot's location in Spoolman\
+ \ (`CFS Lite 1` \u2026 `CFS Lite 4`). A roll in another location (e.g. Storage)\
+ \ is ignored."
+ grid_options:
+ columns: full
+ type: markdown
+ type: grid
+ - cards:
+ - heading: "Spool Details \u2014 CFS Lite"
+ icon: mdi:spool
+ type: heading
+ - entity: sensor.sparkx_i7_cfs_box_1_slot_1_color
+ 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 (state_attr(e[:-10], ''location'') | default('''', true) | lower) ==
+ ''cfs lite 1'' %}{% 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\
+ \ (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs\
+ \ lite 1' %}{% 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 }} \xB7 {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_name') | default('?', true) }} \xB7 {{ (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\
+ \ (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs\
+ \ lite 1' %}{% 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 %}\u2022 {{ state_attr('sensor.spoolman_spool_' ~ ns.id,\
+ \ 'filament_vendor_name') | default('?', true) }} \xB7 {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_material') | default('?', true) }} \xB7 #{{ color |\
+ \ upper }}\n\u2022 Remaining: {{ (states('sensor.spoolman_spool_' ~ ns.id)\
+ \ | float(0)) | round(1) }} g \xB7 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\u2022 Remaining\
+ \ length: {{ ((state_attr('sensor.spoolman_spool_' ~ ns.id, 'remaining_length')\
+ \ | float(0)) / 1000) | round(1) }} m \xB7 used {{ ((state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'used_length') | float(0)) / 1000) | round(1) }} m\n\u2022 Spool:\
+ \ \xD8{{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_diameter')\
+ \ | default('?', true) }} mm \xB7 {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_density') | default('?', true) }} g/cm\xB3 \xB7 {{\
+ \ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_weight') | default('?',\
+ \ true) }} g \xB7 art. {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_article_number')\
+ \ | default('?', true) }}\n\u2022 Temps: bed {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_settings_bed_temp') | default('?', true) }}\xB0C \xB7\
+ \ hotend {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_settings_extruder_temp')\
+ \ | default('?', true) }}\xB0C\n\u2022 Flow: {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_flow_rate') }} \xB7 Runout est.: {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_estimated_runout') }}\n\u2022 Registered: {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'registered') | default('?', true) }} \xB7 Location: {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'location') | default('?', true) }} \xB7 Price: {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_price') | default('?', true) }}{% elif color in ['',\
+ \ 'unknown', 'unavailable'] %}\u2022 Slot color unavailable{% else %}\u2022\
+ \ No spool with stock matches this color{% endif %}"
+ type: custom:mushroom-template-card
+ - entity: sensor.sparkx_i7_cfs_box_1_slot_2_color
+ 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 (state_attr(e[:-10], ''location'') | default('''', true) | lower) ==
+ ''cfs lite 2'' %}{% 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\
+ \ (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs\
+ \ lite 2' %}{% 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 }} \xB7 {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_name') | default('?', true) }} \xB7 {{ (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\
+ \ (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs\
+ \ lite 2' %}{% 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 %}\u2022 {{ state_attr('sensor.spoolman_spool_' ~ ns.id,\
+ \ 'filament_vendor_name') | default('?', true) }} \xB7 {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_material') | default('?', true) }} \xB7 #{{ color |\
+ \ upper }}\n\u2022 Remaining: {{ (states('sensor.spoolman_spool_' ~ ns.id)\
+ \ | float(0)) | round(1) }} g \xB7 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\u2022 Remaining\
+ \ length: {{ ((state_attr('sensor.spoolman_spool_' ~ ns.id, 'remaining_length')\
+ \ | float(0)) / 1000) | round(1) }} m \xB7 used {{ ((state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'used_length') | float(0)) / 1000) | round(1) }} m\n\u2022 Spool:\
+ \ \xD8{{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_diameter')\
+ \ | default('?', true) }} mm \xB7 {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_density') | default('?', true) }} g/cm\xB3 \xB7 {{\
+ \ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_weight') | default('?',\
+ \ true) }} g \xB7 art. {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_article_number')\
+ \ | default('?', true) }}\n\u2022 Temps: bed {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_settings_bed_temp') | default('?', true) }}\xB0C \xB7\
+ \ hotend {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_settings_extruder_temp')\
+ \ | default('?', true) }}\xB0C\n\u2022 Flow: {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_flow_rate') }} \xB7 Runout est.: {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_estimated_runout') }}\n\u2022 Registered: {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'registered') | default('?', true) }} \xB7 Location: {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'location') | default('?', true) }} \xB7 Price: {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_price') | default('?', true) }}{% elif color in ['',\
+ \ 'unknown', 'unavailable'] %}\u2022 Slot color unavailable{% else %}\u2022\
+ \ No spool with stock matches this color{% endif %}"
+ type: custom:mushroom-template-card
+ - entity: sensor.sparkx_i7_cfs_box_1_slot_3_color
+ 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 (state_attr(e[:-10], ''location'') | default('''', true) | lower) ==
+ ''cfs lite 3'' %}{% 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\
+ \ (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs\
+ \ lite 3' %}{% 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 }} \xB7 {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_name') | default('?', true) }} \xB7 {{ (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\
+ \ (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs\
+ \ lite 3' %}{% 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 %}\u2022 {{ state_attr('sensor.spoolman_spool_' ~ ns.id,\
+ \ 'filament_vendor_name') | default('?', true) }} \xB7 {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_material') | default('?', true) }} \xB7 #{{ color |\
+ \ upper }}\n\u2022 Remaining: {{ (states('sensor.spoolman_spool_' ~ ns.id)\
+ \ | float(0)) | round(1) }} g \xB7 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\u2022 Remaining\
+ \ length: {{ ((state_attr('sensor.spoolman_spool_' ~ ns.id, 'remaining_length')\
+ \ | float(0)) / 1000) | round(1) }} m \xB7 used {{ ((state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'used_length') | float(0)) / 1000) | round(1) }} m\n\u2022 Spool:\
+ \ \xD8{{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_diameter')\
+ \ | default('?', true) }} mm \xB7 {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_density') | default('?', true) }} g/cm\xB3 \xB7 {{\
+ \ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_weight') | default('?',\
+ \ true) }} g \xB7 art. {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_article_number')\
+ \ | default('?', true) }}\n\u2022 Temps: bed {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_settings_bed_temp') | default('?', true) }}\xB0C \xB7\
+ \ hotend {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_settings_extruder_temp')\
+ \ | default('?', true) }}\xB0C\n\u2022 Flow: {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_flow_rate') }} \xB7 Runout est.: {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_estimated_runout') }}\n\u2022 Registered: {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'registered') | default('?', true) }} \xB7 Location: {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'location') | default('?', true) }} \xB7 Price: {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_price') | default('?', true) }}{% elif color in ['',\
+ \ 'unknown', 'unavailable'] %}\u2022 Slot color unavailable{% else %}\u2022\
+ \ No spool with stock matches this color{% endif %}"
+ type: custom:mushroom-template-card
+ - entity: sensor.sparkx_i7_cfs_box_1_slot_4_color
+ 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 (state_attr(e[:-10], ''location'') | default('''', true) | lower) ==
+ ''cfs lite 4'' %}{% 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\
+ \ (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs\
+ \ lite 4' %}{% 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 }} \xB7 {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_name') | default('?', true) }} \xB7 {{ (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\
+ \ (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs\
+ \ lite 4' %}{% 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 %}\u2022 {{ state_attr('sensor.spoolman_spool_' ~ ns.id,\
+ \ 'filament_vendor_name') | default('?', true) }} \xB7 {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_material') | default('?', true) }} \xB7 #{{ color |\
+ \ upper }}\n\u2022 Remaining: {{ (states('sensor.spoolman_spool_' ~ ns.id)\
+ \ | float(0)) | round(1) }} g \xB7 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\u2022 Remaining\
+ \ length: {{ ((state_attr('sensor.spoolman_spool_' ~ ns.id, 'remaining_length')\
+ \ | float(0)) / 1000) | round(1) }} m \xB7 used {{ ((state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'used_length') | float(0)) / 1000) | round(1) }} m\n\u2022 Spool:\
+ \ \xD8{{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_diameter')\
+ \ | default('?', true) }} mm \xB7 {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_density') | default('?', true) }} g/cm\xB3 \xB7 {{\
+ \ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_weight') | default('?',\
+ \ true) }} g \xB7 art. {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_article_number')\
+ \ | default('?', true) }}\n\u2022 Temps: bed {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_settings_bed_temp') | default('?', true) }}\xB0C \xB7\
+ \ hotend {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_settings_extruder_temp')\
+ \ | default('?', true) }}\xB0C\n\u2022 Flow: {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_flow_rate') }} \xB7 Runout est.: {{ states('sensor.spoolman_spool_'\
+ \ ~ ns.id ~ '_estimated_runout') }}\n\u2022 Registered: {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'registered') | default('?', true) }} \xB7 Location: {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'location') | default('?', true) }} \xB7 Price: {{ state_attr('sensor.spoolman_spool_'\
+ \ ~ ns.id, 'filament_price') | default('?', true) }}{% elif color in ['',\
+ \ 'unknown', 'unavailable'] %}\u2022 Slot color unavailable{% else %}\u2022\
+ \ No spool with stock matches this color{% endif %}"
+ type: custom:mushroom-template-card
+ type: grid
+ - cards:
+ - heading: Adjust Remaining
+ icon: mdi:pencil-outline
+ type: heading
+ - entities:
+ - input_number.spoolman_set_remaining
+ grid_options:
+ columns: full
+ show_header_toggle: false
+ title: Set value (g)
+ type: entities
+ - entity: input_number.spoolman_set_remaining
+ grid_options:
+ columns: 3
+ icon: mdi:content-save-outline
+ name: Apply to Slot 1
+ tap_action:
+ action: perform-action
+ confirmation:
+ text: Overwrite remaining weight of the spool matching Slot 1 (by color
+ hex) in Spoolman?
+ data:
+ slot: 1
+ perform_action: script.spoolman_set_spool_remaining
+ type: tile
+ - entity: input_number.spoolman_set_remaining
+ grid_options:
+ columns: 3
+ icon: mdi:content-save-outline
+ name: Apply to Slot 2
+ tap_action:
+ action: perform-action
+ confirmation:
+ text: Overwrite remaining weight of the spool matching Slot 2 (by color
+ hex) in Spoolman?
+ data:
+ slot: 2
+ perform_action: script.spoolman_set_spool_remaining
+ type: tile
+ - entity: input_number.spoolman_set_remaining
+ grid_options:
+ columns: 3
+ icon: mdi:content-save-outline
+ name: Apply to Slot 3
+ tap_action:
+ action: perform-action
+ confirmation:
+ text: Overwrite remaining weight of the spool matching Slot 3 (by color
+ hex) in Spoolman?
+ data:
+ slot: 3
+ perform_action: script.spoolman_set_spool_remaining
+ type: tile
+ - entity: input_number.spoolman_set_remaining
+ grid_options:
+ columns: 3
+ icon: mdi:content-save-outline
+ name: Apply to Slot 4
+ tap_action:
+ action: perform-action
+ confirmation:
+ text: Overwrite remaining weight of the spool matching Slot 4 (by color
+ hex) in Spoolman?
+ data:
+ slot: 4
+ perform_action: script.spoolman_set_spool_remaining
+ type: tile
+ - content: "**1.** Type the new remaining grams above. **2.** Tap **Apply to\
+ \ Slot N** for the slot holding that roll \u2014 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** \u2014\
+ \ 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
+ - cards:
+ - heading: Print Linkage
+ icon: mdi:printer-3d-nozzle
+ type: heading
+ - entity: automation.sparkx_i7_latch_print_spool_for_spoolman
+ grid_options:
+ columns: 3
+ icon: mdi:link-variant
+ name: Latch + Segment Deduction
+ type: tile
+ - entity: automation.sparkx_i7_deduct_filament_in_spoolman_on_print_complete
+ grid_options:
+ columns: 3
+ icon: mdi:minus-circle-outline
+ name: Print Complete Deduction
+ type: tile
+ - entity: sensor.sparkx_i7_filament_weight_estimated
+ grid_options:
+ columns: 3
+ icon: mdi:weight-gram
+ name: Current Job Weight (est.)
+ type: tile
+ - entity: input_number.sparkx_i7_filament_g_cm
+ grid_options:
+ columns: 3
+ icon: mdi:ruler
+ name: Filament g/cm
+ type: tile
+ - entity: sensor.sparkx_i7_active_filament_slot
+ grid_options:
+ columns: 3
+ icon: mdi:palette-swatch-variant
+ name: Active CFS Slot
+ type: tile
+ - entity: sensor.sparkx_i7_used_material_length
+ grid_options:
+ columns: 6
+ rows: 1
+ icon: mdi:plus-minus
+ name: Used Material Total (cm)
+ type: tile
+ type: grid
+ - cards:
+ - heading: "Spool History \u2014 CFS Lite (auto)"
+ icon: mdi:history
+ type: heading
+ - card:
+ hours_to_show: 168
+ show_names: true
+ title: Remaining weight (7 days)
+ type: history-graph
+ filter:
+ include:
+ - attributes:
+ location: CFS Lite*
+ entity_id: sensor.spoolman_spool_*
+ grid_options:
+ columns: full
+ show_empty: false
+ sort:
+ attribute: id
+ method: attribute
+ numeric: true
+ type: custom:auto-entities
+ - content: "Every spool whose location starts with **CFS Lite** joins this graph\
+ \ automatically \u2014 register a new roll in Spoolman with location `CFS\
+ \ Lite 1` \u2026 `CFS Lite 4` 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
+ - max_columns: 2
+ path: history
+ sections:
+ - cards:
+ - heading: Temperature History
+ icon: mdi:chart-line-variant
+ type: heading
+ - entities:
+ - color: '#ef5350'
+ entity: sensor.sparkx_i7_nozzle_temperature
+ name: Nozzle
+ - color: '#ffab91'
+ entity: number.sparkx_i7_nozzle_target
+ name: Nozzle Target
+ - color: '#42a5f5'
+ entity: sensor.sparkx_i7_bed_temperature
+ name: Bed
+ - color: '#90caf9'
+ entity: number.sparkx_i7_bed_target
+ name: Bed Target
+ expand_legend: true
+ grid_options:
+ columns: full
+ hours_to_show: 24
+ show_names: true
+ title: Temperatures (24h)
+ type: history-graph
+ - entities:
+ - color: '#ef5350'
+ entity: sensor.sparkx_i7_nozzle_temperature
+ name: Nozzle
+ - color: '#42a5f5'
+ entity: sensor.sparkx_i7_bed_temperature
+ name: Bed
+ expand_legend: true
+ grid_options:
+ columns: full
+ hours_to_show: 168
+ show_names: true
+ title: Temperatures (7 days)
+ type: history-graph
+ type: grid
+ - cards:
+ - heading: Print Activity
+ icon: mdi:chart-box-outline
+ type: heading
+ - apex_config:
+ chart:
+ height: 300
+ stroke:
+ width: 1
+ graph_span: 24h
+ grid_options:
+ columns: full
+ header:
+ colorize_states: true
+ show: true
+ show_states: true
+ title: Z Position (24h)
+ series:
+ - color: '#ab47bc'
+ curve: straight
+ entity: sensor.sparkx_i7_position_z
+ fill_raw: last
+ name: Current Z
+ type: line
+ type: custom:apexcharts-card
+ - entities:
+ - color: '#66bb6a'
+ entity: sensor.sparkx_i7_print_progress
+ name: Progress
+ grid_options:
+ columns: full
+ hours_to_show: 24
+ show_names: true
+ title: Print Progress (24h)
+ type: history-graph
+ - entities:
+ - color: '#26c6da'
+ entity: sensor.sparkx_i7_print_job_time
+ name: Elapsed
+ - color: '#ffa726'
+ entity: sensor.sparkx_i7_print_time_left
+ name: Remaining
+ grid_options:
+ columns: full
+ hours_to_show: 24
+ show_names: true
+ title: Print Duration (24h)
+ type: history-graph
+ type: grid
+ title: History
+ type: sections
diff --git a/.storage/lovelace.sparkx_i7 b/.storage/lovelace.sparkx_i7
index 7d98436d..16a0d22f 100644
--- a/.storage/lovelace.sparkx_i7
+++ b/.storage/lovelace.sparkx_i7
@@ -841,7 +841,7 @@
},
"card_param": "cards",
"filter": {
- "template": "{% set ns = namespace(cards=[]) %}\n{% for n in [1, 2, 3, 4] %}\n {% set sp = namespace(ent='') %}\n {% for s in states.sensor %}\n {% if sp.ent == '' and s.entity_id.startswith('sensor.spoolman_spool_') %}\n {% set loc = (s.attributes.location | default('')) | lower %}\n {% if loc == ('cfs lite ' ~ n) %}\n {% set sp.ent = s.entity_id %}\n {% endif %}\n {% endif %}\n {% endfor %}\n {% set v = namespace(html='', label='Slot ' ~ n, border='transparent', wrap='') %}\n {% if sp.ent != '' %}\n {% set hex = state_attr(sp.ent, 'filament_color_hex') | default('44739e') %}\n {% set hex_clean = hex if hex.startswith('#') else '#' ~ hex %}\n {% set remain = (state_attr(sp.ent, 'remaining_weight') | default(states(sp.ent)) | float(0)) | round(1) %}\n {% set total = state_attr(sp.ent, 'filament_weight') | float(1000) %}\n {% set raw_pct = ((remain / total) * 100) | round(1) if total > 0 else 0 %}\n {% set pct = 0 if raw_pct < 0 else (100 if raw_pct > 100 else raw_pct) %}\n {% set rem_n = states(sp.ent) | float(-1) %}\n {% set band = 2 if (rem_n >= 0 and rem_n < 25) else (1 if (rem_n >= 0 and rem_n < 100) else 0) %}\n {% set v.wrap = ' warn-crit' if band == 2 else (' warn-low' if band == 1 else '') %}\n {% set v.border = '#d0d0d0' if hex_clean | lower in ['#ffffff', '#fff'] else 'transparent' %}\n {% set v.html = \"\" %}\n {% set v.label = 'Slot ' ~ n ~ (' ⚠' if band > 0 else '') %}\n {% else %}\n {% set v.html = \"\" %}\n {% set v.label = \"Slot \" ~ n ~ \" — empty\" %}\n {% endif %}\n {% set card = {\n \"type\": \"custom:button-card\",\n \"entity\": sp.ent if sp.ent != '' else 'sensor.sparkx_i7_active_filament_slot',\n \"show_icon\": false,\n \"show_state\": false,\n \"show_name\": false,\n \"custom_fields\": {\n \"tube\": \"\" ~ v.html ~ \"
\" ~ v.label ~ \"
\"\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 {\"flex-direction\": \"column\"},\n {\"align-items\": \"center\"}\n ]\n }\n },\n \"extra_styles\": \"\n .tube-wrap {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n }\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 \" ~ v.border ~ \";\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n }\n .tube-empty {\n background: transparent;\n border: 2px dashed var(--error-color);\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 .slot-label {\n margin-top: 8px;\n font-size: 12px;\n font-weight: 700;\n letter-spacing: 0.3px;\n color: var(--secondary-text-color);\n }\n .slot-warn {\n color: var(--error-color);\n }\n .warn-low .tube-bg {\n background-color: #fff6df;\n outline: 2px solid var(--warning-color);\n }\n .warn-low .slot-label {\n color: var(--warning-color);\n }\n .warn-crit .tube-bg {\n background-color: #fdecea;\n outline: 2px solid var(--error-color);\n }\n .warn-crit .slot-label {\n color: var(--error-color);\n }\n \",\n \"tap_action\": {\n \"action\": \"more-info\" if sp.ent != '' else \"none\"\n }\n } %}\n\n {% set ns.cards = ns.cards + [card] %}\n{% endfor %}\n{{ ns.cards }}\n"
+ "template": "{% set ns = namespace(cards=[]) %}\n{% for n in [1, 2, 3, 4] %}\n {% set sp = namespace(ent='') %}\n {% for s in states.sensor %}\n {% if sp.ent == '' and s.entity_id.startswith('sensor.spoolman_spool_') %}\n {% set loc = (s.attributes.location | default('')) | lower %}\n {% if loc == ('cfs lite ' ~ n) %}\n {% set sp.ent = s.entity_id %}\n {% endif %}\n {% endif %}\n {% endfor %}\n {% set v = namespace(html='', label='Slot ' ~ n, border='transparent', wrap='', text='#111111', halo='rgba(255,255,255,0.95)') %}\n {% if sp.ent != '' %}\n {% set hex = state_attr(sp.ent, 'filament_color_hex') | default('44739e') %}\n {% set hex_clean = hex if hex.startswith('#') else '#' ~ hex %}\n {% set remain = (state_attr(sp.ent, 'remaining_weight') | default(states(sp.ent)) | float(0)) | round(1) %}\n {% set total = state_attr(sp.ent, 'filament_weight') | float(1000) %}\n {% set raw_pct = ((remain / total) * 100) | round(1) if total > 0 else 0 %}\n {% set pct = 0 if raw_pct < 0 else (100 if raw_pct > 100 else raw_pct) %}\n {% set rem_n = states(sp.ent) | float(-1) %}{% set tr = hex_clean[1:3] | int(0, 16) %}{% set tg = hex_clean[3:5] | int(0, 16) %}{% set tb = hex_clean[5:7] | int(0, 16) %}{% set lum = 0.2126 * tr + 0.7152 * tg + 0.0722 * tb %}{% set v.text = '#ffffff' if (pct >= 60 and lum <= 170) else '#111111' %}{% set v.halo = 'rgba(0,0,0,0.9)' if v.text == '#ffffff' else 'rgba(255,255,255,0.95)' %}\n {% set band = 2 if (rem_n >= 0 and rem_n < 25) else (1 if (rem_n >= 0 and rem_n < 100) else 0) %}\n {% set v.wrap = ' warn-crit' if band == 2 else (' warn-low' if band == 1 else '') %}\n {% set v.border = '#d0d0d0' if hex_clean | lower in ['#ffffff', '#fff'] else 'transparent' %}\n {% set v.html = \"\" %}\n {% set v.label = 'Slot ' ~ n ~ (' ⚠' if band > 0 else '') %}\n {% else %}\n {% set v.html = \"\" %}\n {% set v.label = \"Slot \" ~ n ~ \" — empty\" %}\n {% endif %}\n {% set card = {\n \"type\": \"custom:button-card\",\n \"entity\": sp.ent if sp.ent != '' else 'sensor.sparkx_i7_active_filament_slot',\n \"show_icon\": false,\n \"show_state\": false,\n \"show_name\": false,\n \"custom_fields\": {\n \"tube\": \"\" ~ v.html ~ \"
\" ~ v.label ~ \"
\"\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 {\"flex-direction\": \"column\"},\n {\"align-items\": \"center\"}\n ]\n }\n },\n \"extra_styles\": \"\n .tube-wrap {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n }\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 \" ~ v.border ~ \";\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n }\n .tube-empty {\n background: transparent;\n border: 2px dashed var(--error-color);\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: \" ~ v.text ~ \"; text-shadow: 0 0 3px \" ~ v.halo ~ \", 0 0 6px \" ~ v.halo ~ \";\n pointer-events: none;\n z-index: 2;\n white-space: nowrap;\n }\n .slot-label {\n margin-top: 8px;\n font-size: 12px;\n font-weight: 700;\n letter-spacing: 0.3px;\n color: var(--secondary-text-color);\n }\n .slot-warn {\n color: var(--error-color);\n }\n .warn-low .tube-bg {\n background-color: #fff6df;\n outline: 2px solid var(--warning-color);\n }\n .warn-low .slot-label {\n color: var(--warning-color);\n }\n .warn-crit .tube-bg {\n background-color: #fdecea;\n outline: 2px solid var(--error-color);\n }\n .warn-crit .slot-label {\n color: var(--error-color);\n }\n \",\n \"tap_action\": {\n \"action\": \"more-info\" if sp.ent != '' else \"none\"\n }\n } %}\n\n {% set ns.cards = ns.cards + [card] %}\n{% endfor %}\n{{ ns.cards }}\n"
},
"type": "custom:auto-entities"
},
diff --git a/zigbee2mqtt/state.json b/zigbee2mqtt/state.json
index 56d8bebf..7853a375 100644
--- a/zigbee2mqtt/state.json
+++ b/zigbee2mqtt/state.json
@@ -4,7 +4,7 @@
"state": "ON",
"led_brightness": 100,
"countdown_to_turn_off": 0,
- "voltage": 119.8,
+ "voltage": 119.3,
"countdown_to_turn_on": 0,
"ac_frequency": 60,
"power_factor": 0.14,
@@ -47,7 +47,7 @@
"countdown_to_turn_off": 0,
"voltage": 119.1,
"countdown_to_turn_on": 0,
- "energy": 109.88,
+ "energy": 109.89,
"power_factor": 0.9,
"ac_frequency": 60,
"update": {
@@ -58,7 +58,7 @@
"latest_release_notes": null
},
"linkquality": 145,
- "power": 94.9,
+ "power": 91.7,
"current": 0.89,
"power_on_behavior": "on"
},
@@ -74,13 +74,13 @@
"led_brightness": 100,
"countdown_to_turn_off": 0,
"countdown_to_turn_on": 0,
- "voltage": 119.5,
+ "voltage": 118.6,
"state": "ON",
"ac_frequency": 60,
"energy": 223.05,
- "power": 6.2,
- "current": 0.08,
- "power_factor": 0.38,
+ "power": 131,
+ "current": 1.12,
+ "power_factor": 0.96,
"update": {
"state": "idle",
"installed_version": 268513381,
@@ -95,11 +95,11 @@
"led_brightness": 100,
"countdown_to_turn_off": 0,
"countdown_to_turn_on": 0,
- "voltage": 119.3,
+ "voltage": 118.8,
"energy": 104.53,
"state": "ON",
- "power": 61,
- "current": 0.61,
+ "power": 51.2,
+ "current": 0.63,
"ac_frequency": 60,
"power_factor": 0.79,
"update": {
@@ -114,7 +114,7 @@
},
"0xffffb40e060895b3": {
"state": "ON",
- "voltage": 117.8,
+ "voltage": 117.3,
"ac_frequency": 60,
"energy": 15.34,
"current": 0.31,
@@ -136,14 +136,14 @@
"0xffffb40e0608864e": {
"led_brightness": 100,
"countdown_to_turn_off": 0,
- "voltage": 122,
+ "voltage": 121.7,
"energy": 37.98,
"countdown_to_turn_on": 0,
"state": "ON",
"current": 0.02,
"ac_frequency": 60,
"power": 0.4,
- "power_factor": 0.2,
+ "power_factor": 0.14,
"update": {
"state": "idle",
"installed_version": 268513381,