Compare commits
No files matched your search
@@ -1 +1 @@
|
||||
2026.8.3
|
||||
2026.10.1
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 37 KiB |
@@ -0,0 +1,139 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: '1791477238729'
|
||||
captured: '2026-10-09T00:21:25.595930+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238729'
|
||||
alias: SparkX i7 - Deduct filament in Spoolman on print complete
|
||||
description: On print completion, deducts the final segment (used_material_length
|
||||
delta since last checkpoint x g/cm) from the Spoolman spool matching the latched
|
||||
slot color (remaining weight > 0 guard), accumulates it per slot, then sends a
|
||||
summary notification with total and per-slot breakdown whenever anything was deducted.
|
||||
Silent when total is 0. Clears the latch and re-baselines the checkpoint.
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
from: printing
|
||||
to: completed
|
||||
conditions: []
|
||||
actions:
|
||||
- variables:
|
||||
old_slot: '{{ states(''input_text.sparkx_i7_print_spool_latch'') }}'
|
||||
cur: '{{ states(''sensor.sparkx_i7_used_material_length'') | float(0) }}'
|
||||
checkpoint: '{{ states(''input_number.sparkx_i7_spoolman_length_checkpoint'')
|
||||
| float(0) }}'
|
||||
- variables:
|
||||
final_grams: '{{ (([cur | float - (checkpoint | float), 0] | max) * (states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.03))) | round(2) }}'
|
||||
color: '{{ states(''sensor.sparkx_i7_cfs_'' ~ (old_slot | lower | replace(''
|
||||
'', ''_'')) ~ ''_color'') | replace(''#'', '''') | lower }}'
|
||||
- variables:
|
||||
spool_id: '{% set ns = namespace(id='''') %}{% for e in integration_entities(''spoolman'')
|
||||
%}{% if e.endswith(''_color_hex'') and (states(e) | replace(''#'', '''') |
|
||||
lower) == color %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and
|
||||
ns.id == '''' %}{% set ns.id = states(b ~ ''_id'') %}{% endif %}{% endif %}{%
|
||||
endfor %}{{ ns.id }}'
|
||||
- variables:
|
||||
helper_idx: '{{ old_slot.split('' '')[-1] if old_slot.split('' '')[-1] in [''1'',
|
||||
''2'', ''3'', ''4''] else '''' }}'
|
||||
- variables:
|
||||
nonhelper_g: '{{ final_grams if (final_grams | float > 0) and (spool_id not
|
||||
in ['''', ''unknown'', ''unavailable'']) and (helper_idx == '''') else 0 }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ final_grams | float > 0 }}'
|
||||
then:
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id not in ['''', ''unknown'', ''unavailable'']
|
||||
}}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ final_grams | float(0) }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ helper_idx != '''' }}'
|
||||
then:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_slot_{{ helper_idx }}_grams
|
||||
data:
|
||||
value: '{{ (states(''input_number.sparkx_i7_slot_'' ~ helper_idx ~ ''_grams'')
|
||||
| float(0)) + (final_grams | float) }}'
|
||||
default:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print completed: final segment of {{ final_grams }} g from {{
|
||||
old_slot if old_slot else ''the active slot'' }} (color #{{ color | upper
|
||||
}}) could not be deducted - no Spoolman spool with remaining weight matches
|
||||
that color. Register the new roll in Spoolman, then adjust manually if
|
||||
needed.'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print completed: final segment of {{ final_grams }} g from {{
|
||||
old_slot if old_slot else ''the active slot'' }} (color #{{ color | upper
|
||||
}}) could not be deducted - no Spoolman spool with remaining weight matches
|
||||
that color. Register the new roll in Spoolman, then adjust manually if
|
||||
needed.'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print completed: final segment of {{ final_grams }} g from {{
|
||||
old_slot if old_slot else ''the active slot'' }} (color #{{ color | upper
|
||||
}}) could not be deducted - no Spoolman spool with remaining weight matches
|
||||
that color. Register the new roll in Spoolman, then adjust manually if
|
||||
needed.'
|
||||
- variables:
|
||||
summary_total: '{% set ns = namespace(t = 0) %}{% for n in [''1'', ''2'', ''3'',
|
||||
''4''] %}{% set g = states(''input_number.sparkx_i7_slot_'' ~ n ~ ''_grams'')
|
||||
| float(0) %}{% if g > 0 %}{% set ns.t = ns.t + g %}{% endif %}{% endfor %}{{
|
||||
(ns.t + (nonhelper_g | float)) | round(1) }}'
|
||||
- variables:
|
||||
summary_lines: '{% set ns = namespace(l = []) %}{% for n in [''1'', ''2'', ''3'',
|
||||
''4''] %}{% set g = states(''input_number.sparkx_i7_slot_'' ~ n ~ ''_grams'')
|
||||
| float(0) %}{% if g > 0 %}{% set ns.l = ns.l + [''Slot '' ~ n ~ '' ('' ~
|
||||
states(''sensor.sparkx_i7_slot_'' ~ n ~ ''_color_name'') ~ ''): '' ~ (g |
|
||||
round(1)) ~ '' g''] %}{% endif %}{% endfor %}{% if nonhelper_g | float > 0
|
||||
%}{% set ns.l = ns.l + [(old_slot if old_slot else ''Unlatched'') ~ '': ''
|
||||
~ (nonhelper_g | float | round(1)) ~ '' g''] %}{% endif %}{{ ns.l | join(''\n'')
|
||||
}}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ summary_total | float > 0 }}'
|
||||
then:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: Print complete - Spoolman updated
|
||||
message: 'Print complete - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: Print complete - Spoolman updated
|
||||
message: 'Print complete - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: Print complete - Spoolman updated
|
||||
message: 'Print complete - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: ''
|
||||
mode: single
|
||||
@@ -0,0 +1,140 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: '1791477238729'
|
||||
captured: '2026-10-09T00:32:47.977680+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238729'
|
||||
alias: SparkX i7 - Deduct filament in Spoolman on print complete
|
||||
description: On print completion, deducts the final segment (used_material_length
|
||||
delta since last checkpoint x g/cm) from the Spoolman spool matching the latched
|
||||
slot color (remaining weight > 0 guard), accumulates it per slot, then sends a
|
||||
summary notification with total and per-slot breakdown whenever anything was deducted.
|
||||
Silent when total is 0. Clears the latch and re-baselines the checkpoint.
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
from: printing
|
||||
to: completed
|
||||
conditions: []
|
||||
actions:
|
||||
- variables:
|
||||
old_slot: '{{ states(''input_text.sparkx_i7_print_spool_latch'') }}'
|
||||
cur: '{{ states(''sensor.sparkx_i7_used_material_length'') | float(0) }}'
|
||||
checkpoint: '{{ states(''input_number.sparkx_i7_spoolman_length_checkpoint'')
|
||||
| float(0) }}'
|
||||
- variables:
|
||||
final_grams: '{{ (([cur | float - (checkpoint | float), 0] | max) * (states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.03))) | round(2) }}'
|
||||
color: '{{ states(''sensor.sparkx_i7_cfs_'' ~ (old_slot | lower | replace(''
|
||||
'', ''_'')) ~ ''_color'') | replace(''#'', '''') | lower }}'
|
||||
- variables:
|
||||
spool_id: '{% 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 %}{{ ns.id }}'
|
||||
- variables:
|
||||
helper_idx: '{{ old_slot.split('' '')[-1] if old_slot.split('' '')[-1] in [''1'',
|
||||
''2'', ''3'', ''4''] else '''' }}'
|
||||
- variables:
|
||||
nonhelper_g: '{{ final_grams if (final_grams | float > 0) and (spool_id not
|
||||
in ['''', ''unknown'', ''unavailable'']) and (helper_idx == '''') else 0 }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ final_grams | float > 0 }}'
|
||||
then:
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id not in ['''', ''unknown'', ''unavailable'']
|
||||
}}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ final_grams | float(0) }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ helper_idx != '''' }}'
|
||||
then:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_slot_{{ helper_idx }}_grams
|
||||
data:
|
||||
value: '{{ (states(''input_number.sparkx_i7_slot_'' ~ helper_idx ~ ''_grams'')
|
||||
| float(0)) + (final_grams | float) }}'
|
||||
default:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print completed: final segment of {{ final_grams }} g from {{
|
||||
old_slot if old_slot else ''the active slot'' }} (color #{{ color | upper
|
||||
}}) could not be deducted - no Spoolman spool with remaining weight matches
|
||||
that color. Register the new roll in Spoolman, then adjust manually if
|
||||
needed.'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print completed: final segment of {{ final_grams }} g from {{
|
||||
old_slot if old_slot else ''the active slot'' }} (color #{{ color | upper
|
||||
}}) could not be deducted - no Spoolman spool with remaining weight matches
|
||||
that color. Register the new roll in Spoolman, then adjust manually if
|
||||
needed.'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print completed: final segment of {{ final_grams }} g from {{
|
||||
old_slot if old_slot else ''the active slot'' }} (color #{{ color | upper
|
||||
}}) could not be deducted - no Spoolman spool with remaining weight matches
|
||||
that color. Register the new roll in Spoolman, then adjust manually if
|
||||
needed.'
|
||||
- variables:
|
||||
summary_total: '{% set ns = namespace(t = 0) %}{% for n in [''1'', ''2'', ''3'',
|
||||
''4''] %}{% set g = states(''input_number.sparkx_i7_slot_'' ~ n ~ ''_grams'')
|
||||
| float(0) %}{% if g > 0 %}{% set ns.t = ns.t + g %}{% endif %}{% endfor %}{{
|
||||
(ns.t + (nonhelper_g | float)) | round(1) }}'
|
||||
- variables:
|
||||
summary_lines: '{% set ns = namespace(l = []) %}{% for n in [''1'', ''2'', ''3'',
|
||||
''4''] %}{% set g = states(''input_number.sparkx_i7_slot_'' ~ n ~ ''_grams'')
|
||||
| float(0) %}{% if g > 0 %}{% set ns.l = ns.l + [''Slot '' ~ n ~ '' ('' ~
|
||||
states(''sensor.sparkx_i7_slot_'' ~ n ~ ''_color_name'') ~ ''): '' ~ (g |
|
||||
round(1)) ~ '' g''] %}{% endif %}{% endfor %}{% if nonhelper_g | float > 0
|
||||
%}{% set ns.l = ns.l + [(old_slot if old_slot else ''Unlatched'') ~ '': ''
|
||||
~ (nonhelper_g | float | round(1)) ~ '' g''] %}{% endif %}{{ ns.l | join(''\n'')
|
||||
}}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ summary_total | float > 0 }}'
|
||||
then:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: Print complete - Spoolman updated
|
||||
message: 'Print complete - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: Print complete - Spoolman updated
|
||||
message: 'Print complete - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: Print complete - Spoolman updated
|
||||
message: 'Print complete - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: ''
|
||||
mode: single
|
||||
@@ -0,0 +1,171 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: '1791477238729'
|
||||
captured: '2026-10-12T16:33:11.682946+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238729'
|
||||
alias: SparkX i7 - Deduct filament in Spoolman on print complete
|
||||
description: On print completion, deducts the final segment (used_material_length
|
||||
delta since last checkpoint x g/cm) from the Spoolman spool in the CFS Lite location
|
||||
matching the latched slot color (remaining weight > 0 guard), accumulates it per
|
||||
slot, then sends a summary notification with total and per-slot breakdown whenever
|
||||
anything was deducted. Silent when total is 0. Clears the latch and re-baselines
|
||||
the checkpoint.
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
from: printing
|
||||
to: completed
|
||||
id: complete
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
to: stopped
|
||||
id: stopped
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
to: error
|
||||
id: error
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: '{{ trigger.id == ''complete'' or states(''input_text.sparkx_i7_print_spool_latch'')
|
||||
not in ['''', ''unknown'', ''unavailable''] }}'
|
||||
actions:
|
||||
- variables:
|
||||
old_slot: '{{ states(''input_text.sparkx_i7_print_spool_latch'') }}'
|
||||
cur: '{{ states(''sensor.sparkx_i7_used_material_length'') | float(0) }}'
|
||||
checkpoint: '{{ states(''input_number.sparkx_i7_spoolman_length_checkpoint'')
|
||||
| float(0) }}'
|
||||
outcome: '{% set tid = trigger.id | default(''complete'') %}{{ ''cancelled''
|
||||
if tid == ''stopped'' else (''error'' if tid == ''error'' else ''complete'')
|
||||
}}'
|
||||
- variables:
|
||||
final_grams: '{{ (([cur | float - (checkpoint | float), 0] | max) * (states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.03))) | round(2) }}'
|
||||
color: '{{ states(''sensor.sparkx_i7_cfs_'' ~ (old_slot | lower | replace(''
|
||||
'', ''_'')) ~ ''_color'') | replace(''#'', '''') | lower }}'
|
||||
- variables:
|
||||
spool_id: '{% 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 %}{{ ns.id }}'
|
||||
- variables:
|
||||
helper_idx: '{{ old_slot.split('' '')[-1] if old_slot.split('' '')[-1] in [''1'',
|
||||
''2'', ''3'', ''4''] else '''' }}'
|
||||
- variables:
|
||||
nonhelper_g: '{{ final_grams if (final_grams | float > 0) and (spool_id not
|
||||
in ['''', ''unknown'', ''unavailable'']) and (helper_idx == '''') else 0 }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ final_grams | float > 0 }}'
|
||||
then:
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id not in ['''', ''unknown'', ''unavailable'']
|
||||
}}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ final_grams | float(0) }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ helper_idx != '''' }}'
|
||||
then:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_slot_{{ helper_idx }}_grams
|
||||
data:
|
||||
value: '{{ (states(''input_number.sparkx_i7_slot_'' ~ helper_idx ~ ''_grams'')
|
||||
| float(0)) + (final_grams | float) }}'
|
||||
default:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print {{ outcome }}: final segment of {{ final_grams }} g from
|
||||
{{ old_slot if old_slot else ''the active slot'' }} (color #{{ color |
|
||||
upper }}) could not be deducted - no Spoolman spool in the CFS Lite location
|
||||
with remaining weight matches that color. Register the new roll in Spoolman
|
||||
with location CFS Lite, then adjust manually if needed.'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print {{ outcome }}: final segment of {{ final_grams }} g from
|
||||
{{ old_slot if old_slot else ''the active slot'' }} (color #{{ color |
|
||||
upper }}) could not be deducted - no Spoolman spool in the CFS Lite location
|
||||
with remaining weight matches that color. Register the new roll in Spoolman
|
||||
with location CFS Lite, then adjust manually if needed.'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print {{ outcome }}: final segment of {{ final_grams }} g from
|
||||
{{ old_slot if old_slot else ''the active slot'' }} (color #{{ color |
|
||||
upper }}) could not be deducted - no Spoolman spool in the CFS Lite location
|
||||
with remaining weight matches that color. Register the new roll in Spoolman
|
||||
with location CFS Lite, then adjust manually if needed.'
|
||||
- variables:
|
||||
summary_total: '{% set ns = namespace(t = 0) %}{% for n in [''1'', ''2'', ''3'',
|
||||
''4''] %}{% set g = states(''input_number.sparkx_i7_slot_'' ~ n ~ ''_grams'')
|
||||
| float(0) %}{% if g > 0 %}{% set ns.t = ns.t + g %}{% endif %}{% endfor %}{{
|
||||
(ns.t + (nonhelper_g | float)) | round(1) }}'
|
||||
- variables:
|
||||
summary_lines: '{% set ns = namespace(l = []) %}{% for n in [''1'', ''2'', ''3'',
|
||||
''4''] %}{% set g = states(''input_number.sparkx_i7_slot_'' ~ n ~ ''_grams'')
|
||||
| float(0) %}{% if g > 0 %}{% set ns.l = ns.l + [''Slot '' ~ n ~ '' ('' ~
|
||||
states(''sensor.sparkx_i7_slot_'' ~ n ~ ''_color_name'') ~ ''): '' ~ (g |
|
||||
round(1)) ~ '' g''] %}{% endif %}{% endfor %}{% if nonhelper_g | float > 0
|
||||
%}{% set ns.l = ns.l + [(old_slot if old_slot else ''Unlatched'') ~ '': ''
|
||||
~ (nonhelper_g | float | round(1)) ~ '' g''] %}{% endif %}{{ ns.l | join(''\n'')
|
||||
}}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ summary_total | float > 0 }}'
|
||||
then:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: Print {{ outcome }} - Spoolman updated
|
||||
message: 'Print {{ outcome }} - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: Print {{ outcome }} - Spoolman updated
|
||||
message: 'Print {{ outcome }} - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: Print {{ outcome }} - Spoolman updated
|
||||
message: 'Print {{ outcome }} - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ trigger.id == ''complete'' }}'
|
||||
then:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_last_job_filament_weight
|
||||
data:
|
||||
value: '{{ final_grams }}'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_last_job_cost
|
||||
data:
|
||||
value: '{{ ((final_grams | float) * (states(''input_number.filament_price_per_kg'')
|
||||
| float(25)) / 1000) | round(2) }}'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: ''
|
||||
mode: single
|
||||
@@ -0,0 +1,171 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: '1791477238729'
|
||||
captured: '2026-10-15T13:23:17.499559+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238729'
|
||||
alias: SparkX i7 - Deduct filament in Spoolman on print complete
|
||||
description: On print completion, deducts the final segment (used_material_length
|
||||
delta since last checkpoint x g/cm) from the Spoolman spool in the CFS Lite location
|
||||
matching the latched slot color (remaining weight > 0 guard), accumulates it per
|
||||
slot, then sends a summary notification with total and per-slot breakdown whenever
|
||||
anything was deducted. Silent when total is 0. Clears the latch and re-baselines
|
||||
the checkpoint.
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
from: printing
|
||||
to: completed
|
||||
id: complete
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
to: stopped
|
||||
id: stopped
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
to: error
|
||||
id: error
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: '{{ trigger.id == ''complete'' or states(''input_text.sparkx_i7_print_spool_latch'')
|
||||
not in ['''', ''unknown'', ''unavailable''] }}'
|
||||
actions:
|
||||
- variables:
|
||||
old_slot: '{{ states(''input_text.sparkx_i7_print_spool_latch'') }}'
|
||||
cur: '{{ states(''sensor.sparkx_i7_used_material_length'') | float(0) }}'
|
||||
checkpoint: '{{ states(''input_number.sparkx_i7_spoolman_length_checkpoint'')
|
||||
| float(0) }}'
|
||||
outcome: '{% set tid = trigger.id | default(''complete'') %}{{ ''cancelled''
|
||||
if tid == ''stopped'' else (''error'' if tid == ''error'' else ''complete'')
|
||||
}}'
|
||||
- variables:
|
||||
final_grams: '{{ (([cur | float - (checkpoint | float), 0] | max) * (states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.03))) | round(2) }}'
|
||||
color: '{{ states(''sensor.sparkx_i7_cfs_'' ~ (old_slot | lower | replace(''
|
||||
'', ''_'')) ~ ''_color'') | replace(''#'', '''') | lower }}'
|
||||
- variables:
|
||||
spool_id: '{% 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 '' ~ old_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 %}{{
|
||||
ns.id }}'
|
||||
- variables:
|
||||
helper_idx: '{{ old_slot.split(''_'')[-1] if old_slot.split(''_'')[-1] in [''1'',
|
||||
''2'', ''3'', ''4''] else '''' }}'
|
||||
- variables:
|
||||
nonhelper_g: '{{ final_grams if (final_grams | float > 0) and (spool_id not
|
||||
in ['''', ''unknown'', ''unavailable'']) and (helper_idx == '''') else 0 }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ final_grams | float > 0 }}'
|
||||
then:
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id not in ['''', ''unknown'', ''unavailable'']
|
||||
}}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ final_grams | float(0) }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ helper_idx != '''' }}'
|
||||
then:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_slot_{{ helper_idx }}_grams
|
||||
data:
|
||||
value: '{{ (states(''input_number.sparkx_i7_slot_'' ~ helper_idx ~ ''_grams'')
|
||||
| float(0)) + (final_grams | float) }}'
|
||||
default:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print {{ outcome }}: final segment of {{ final_grams }} g from
|
||||
{{ old_slot if old_slot else ''the active slot'' }} (color #{{ color |
|
||||
upper }}) could not be deducted - no Spoolman spool in the CFS Lite location
|
||||
with remaining weight matches that color. Register the new roll in Spoolman
|
||||
with location CFS Lite, then adjust manually if needed.'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print {{ outcome }}: final segment of {{ final_grams }} g from
|
||||
{{ old_slot if old_slot else ''the active slot'' }} (color #{{ color |
|
||||
upper }}) could not be deducted - no Spoolman spool in the CFS Lite location
|
||||
with remaining weight matches that color. Register the new roll in Spoolman
|
||||
with location CFS Lite, then adjust manually if needed.'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print {{ outcome }}: final segment of {{ final_grams }} g from
|
||||
{{ old_slot if old_slot else ''the active slot'' }} (color #{{ color |
|
||||
upper }}) could not be deducted - no Spoolman spool in the CFS Lite location
|
||||
with remaining weight matches that color. Register the new roll in Spoolman
|
||||
with location CFS Lite, then adjust manually if needed.'
|
||||
- variables:
|
||||
summary_total: '{% set ns = namespace(t = 0) %}{% for n in [''1'', ''2'', ''3'',
|
||||
''4''] %}{% set g = states(''input_number.sparkx_i7_slot_'' ~ n ~ ''_grams'')
|
||||
| float(0) %}{% if g > 0 %}{% set ns.t = ns.t + g %}{% endif %}{% endfor %}{{
|
||||
(ns.t + (nonhelper_g | float)) | round(1) }}'
|
||||
- variables:
|
||||
summary_lines: '{% set ns = namespace(l = []) %}{% for n in [''1'', ''2'', ''3'',
|
||||
''4''] %}{% set g = states(''input_number.sparkx_i7_slot_'' ~ n ~ ''_grams'')
|
||||
| float(0) %}{% if g > 0 %}{% set ns.l = ns.l + [''Slot '' ~ n ~ '' ('' ~
|
||||
states(''sensor.sparkx_i7_slot_'' ~ n ~ ''_color_name'') ~ ''): '' ~ (g |
|
||||
round(1)) ~ '' g''] %}{% endif %}{% endfor %}{% if nonhelper_g | float > 0
|
||||
%}{% set ns.l = ns.l + [(old_slot if old_slot else ''Unlatched'') ~ '': ''
|
||||
~ (nonhelper_g | float | round(1)) ~ '' g''] %}{% endif %}{{ ns.l | join(''\n'')
|
||||
}}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ summary_total | float > 0 }}'
|
||||
then:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: Print {{ outcome }} - Spoolman updated
|
||||
message: 'Print {{ outcome }} - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: Print {{ outcome }} - Spoolman updated
|
||||
message: 'Print {{ outcome }} - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: Print {{ outcome }} - Spoolman updated
|
||||
message: 'Print {{ outcome }} - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ trigger.id == ''complete'' }}'
|
||||
then:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_last_job_filament_weight
|
||||
data:
|
||||
value: '{{ summary_total }}'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_last_job_cost
|
||||
data:
|
||||
value: '{{ ((summary_total | float) * (states(''input_number.filament_price_per_kg'')
|
||||
| float(25)) / 1000) | round(2) }}'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: ''
|
||||
mode: single
|
||||
@@ -0,0 +1,150 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: '1791477238762'
|
||||
captured: '2026-10-09T00:21:25.534171+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238762'
|
||||
alias: SparkX i7 - Latch print spool for Spoolman
|
||||
description: 'Segment tracking for Spoolman: at print start resets the length checkpoint
|
||||
and per-slot gram counters and latches the active CFS slot. On every slot change
|
||||
mid-print, deducts the exact extrusion of the finished segment (used_material_length
|
||||
delta x g/cm) from the Spoolman spool matching the previous slot color hex (only
|
||||
if that spool has remaining weight), accumulates grams per slot, notifies on no-match,
|
||||
then re-baselines the checkpoint and advances the latch.'
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
to: printing
|
||||
id: print_started
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_active_filament_slot
|
||||
id: slot_changed
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
state: printing
|
||||
actions:
|
||||
- variables:
|
||||
new_slot: '{{ states(''sensor.sparkx_i7_active_filament_slot'') }}'
|
||||
old_slot: '{{ states(''input_text.sparkx_i7_print_spool_latch'') }}'
|
||||
cur: '{{ states(''sensor.sparkx_i7_used_material_length'') | float(0) }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: trigger
|
||||
id: print_started
|
||||
sequence:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id:
|
||||
- input_number.sparkx_i7_slot_1_grams
|
||||
- input_number.sparkx_i7_slot_2_grams
|
||||
- input_number.sparkx_i7_slot_3_grams
|
||||
- input_number.sparkx_i7_slot_4_grams
|
||||
data:
|
||||
value: 0
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ new_slot if new_slot not in [''unknown'', ''unavailable''] else
|
||||
'''' }}'
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ old_slot not in ['''', ''unknown'', ''unavailable''] and
|
||||
new_slot not in ['''', ''unknown'', ''unavailable''] and new_slot != old_slot
|
||||
}}'
|
||||
sequence:
|
||||
- variables:
|
||||
grams: '{{ (([cur | float - (states(''input_number.sparkx_i7_spoolman_length_checkpoint'')
|
||||
| float(0)), 0] | max) * (states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.03))) | round(2) }}'
|
||||
color: '{{ states(''sensor.sparkx_i7_cfs_'' ~ (old_slot | lower | replace(''
|
||||
'', ''_'')) ~ ''_color'') | replace(''#'', '''') | lower }}'
|
||||
- variables:
|
||||
spool_id: '{% set ns = namespace(id='''') %}{% for e in integration_entities(''spoolman'')
|
||||
%}{% if e.endswith(''_color_hex'') and (states(e) | replace(''#'', '''')
|
||||
| lower) == color %}{% set b = e[:-10] %}{% if (states(b) | float(0))
|
||||
> 0 and ns.id == '''' %}{% set ns.id = states(b ~ ''_id'') %}{% endif
|
||||
%}{% endif %}{% endfor %}{{ ns.id }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ grams | float > 0 }}'
|
||||
then:
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id not in ['''', ''unknown'', ''unavailable'']
|
||||
}}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ grams | float(0) }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ old_slot.split('' '')[-1] in [''1'', ''2'', ''3'',
|
||||
''4''] }}'
|
||||
then:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_slot_{{ old_slot.split(' ')[-1]
|
||||
}}_grams
|
||||
data:
|
||||
value: '{{ (states(''input_number.sparkx_i7_slot_'' ~ old_slot.split(''
|
||||
'')[-1] ~ ''_grams'') | float(0)) + (grams | float) }}'
|
||||
default:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Segment of {{ grams }} g from {{ old_slot }} (color #{{ color
|
||||
| upper }}) could not be deducted - no Spoolman spool with remaining
|
||||
weight matches that color. Register the new roll in Spoolman, then
|
||||
adjust manually if needed.'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Segment of {{ grams }} g from {{ old_slot }} (color #{{ color
|
||||
| upper }}) could not be deducted - no Spoolman spool with remaining
|
||||
weight matches that color. Register the new roll in Spoolman, then
|
||||
adjust manually if needed.'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Segment of {{ grams }} g from {{ old_slot }} (color #{{ color
|
||||
| upper }}) could not be deducted - no Spoolman spool with remaining
|
||||
weight matches that color. Register the new roll in Spoolman, then
|
||||
adjust manually if needed.'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ new_slot }}'
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ old_slot in ['''', ''unknown'', ''unavailable''] and new_slot
|
||||
not in ['''', ''unknown'', ''unavailable''] }}'
|
||||
sequence:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ new_slot }}'
|
||||
mode: queued
|
||||
max: 10
|
||||
@@ -0,0 +1,151 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: '1791477238762'
|
||||
captured: '2026-10-09T00:32:47.861324+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238762'
|
||||
alias: SparkX i7 - Latch print spool for Spoolman
|
||||
description: 'Segment tracking for Spoolman: at print start resets the length checkpoint
|
||||
and per-slot gram counters and latches the active CFS slot. On every slot change
|
||||
mid-print, deducts the exact extrusion of the finished segment (used_material_length
|
||||
delta x g/cm) from the Spoolman spool matching the previous slot color hex (only
|
||||
if that spool has remaining weight), accumulates grams per slot, notifies on no-match,
|
||||
then re-baselines the checkpoint and advances the latch.'
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
to: printing
|
||||
id: print_started
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_active_filament_slot
|
||||
id: slot_changed
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
state: printing
|
||||
actions:
|
||||
- variables:
|
||||
new_slot: '{{ states(''sensor.sparkx_i7_active_filament_slot'') }}'
|
||||
old_slot: '{{ states(''input_text.sparkx_i7_print_spool_latch'') }}'
|
||||
cur: '{{ states(''sensor.sparkx_i7_used_material_length'') | float(0) }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: trigger
|
||||
id: print_started
|
||||
sequence:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id:
|
||||
- input_number.sparkx_i7_slot_1_grams
|
||||
- input_number.sparkx_i7_slot_2_grams
|
||||
- input_number.sparkx_i7_slot_3_grams
|
||||
- input_number.sparkx_i7_slot_4_grams
|
||||
data:
|
||||
value: 0
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ new_slot if new_slot not in [''unknown'', ''unavailable''] else
|
||||
'''' }}'
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ old_slot not in ['''', ''unknown'', ''unavailable''] and
|
||||
new_slot not in ['''', ''unknown'', ''unavailable''] and new_slot != old_slot
|
||||
}}'
|
||||
sequence:
|
||||
- variables:
|
||||
grams: '{{ (([cur | float - (states(''input_number.sparkx_i7_spoolman_length_checkpoint'')
|
||||
| float(0)), 0] | max) * (states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.03))) | round(2) }}'
|
||||
color: '{{ states(''sensor.sparkx_i7_cfs_'' ~ (old_slot | lower | replace(''
|
||||
'', ''_'')) ~ ''_color'') | replace(''#'', '''') | lower }}'
|
||||
- variables:
|
||||
spool_id: '{% 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 %}{{ ns.id }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ grams | float > 0 }}'
|
||||
then:
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id not in ['''', ''unknown'', ''unavailable'']
|
||||
}}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ grams | float(0) }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ old_slot.split('' '')[-1] in [''1'', ''2'', ''3'',
|
||||
''4''] }}'
|
||||
then:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_slot_{{ old_slot.split(' ')[-1]
|
||||
}}_grams
|
||||
data:
|
||||
value: '{{ (states(''input_number.sparkx_i7_slot_'' ~ old_slot.split(''
|
||||
'')[-1] ~ ''_grams'') | float(0)) + (grams | float) }}'
|
||||
default:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Segment of {{ grams }} g from {{ old_slot }} (color #{{ color
|
||||
| upper }}) could not be deducted - no Spoolman spool with remaining
|
||||
weight matches that color. Register the new roll in Spoolman, then
|
||||
adjust manually if needed.'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Segment of {{ grams }} g from {{ old_slot }} (color #{{ color
|
||||
| upper }}) could not be deducted - no Spoolman spool with remaining
|
||||
weight matches that color. Register the new roll in Spoolman, then
|
||||
adjust manually if needed.'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Segment of {{ grams }} g from {{ old_slot }} (color #{{ color
|
||||
| upper }}) could not be deducted - no Spoolman spool with remaining
|
||||
weight matches that color. Register the new roll in Spoolman, then
|
||||
adjust manually if needed.'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ new_slot }}'
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ old_slot in ['''', ''unknown'', ''unavailable''] and new_slot
|
||||
not in ['''', ''unknown'', ''unavailable''] }}'
|
||||
sequence:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ new_slot }}'
|
||||
mode: queued
|
||||
max: 10
|
||||
@@ -0,0 +1,152 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: '1791477238762'
|
||||
captured: '2026-10-12T16:31:06.438795+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238762'
|
||||
alias: SparkX i7 - Latch print spool for Spoolman
|
||||
description: 'Segment tracking for Spoolman: at print start resets the length checkpoint
|
||||
and per-slot gram counters and latches the active CFS slot. On every slot change
|
||||
mid-print, deducts the exact extrusion of the finished segment (used_material_length
|
||||
delta x g/cm) from the Spoolman spool in the CFS Lite location matching the previous
|
||||
slot color hex (only if that spool has remaining weight), accumulates grams per
|
||||
slot, notifies on no-match, then re-baselines the checkpoint and advances the
|
||||
latch.'
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
to: printing
|
||||
id: print_started
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_active_filament_slot
|
||||
id: slot_changed
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
state: printing
|
||||
actions:
|
||||
- variables:
|
||||
new_slot: '{{ states(''sensor.sparkx_i7_active_filament_slot'') }}'
|
||||
old_slot: '{{ states(''input_text.sparkx_i7_print_spool_latch'') }}'
|
||||
cur: '{{ states(''sensor.sparkx_i7_used_material_length'') | float(0) }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: trigger
|
||||
id: print_started
|
||||
sequence:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id:
|
||||
- input_number.sparkx_i7_slot_1_grams
|
||||
- input_number.sparkx_i7_slot_2_grams
|
||||
- input_number.sparkx_i7_slot_3_grams
|
||||
- input_number.sparkx_i7_slot_4_grams
|
||||
data:
|
||||
value: 0
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ new_slot if new_slot not in [''unknown'', ''unavailable''] else
|
||||
'''' }}'
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ old_slot not in ['''', ''unknown'', ''unavailable''] and
|
||||
new_slot not in ['''', ''unknown'', ''unavailable''] and new_slot != old_slot
|
||||
}}'
|
||||
sequence:
|
||||
- variables:
|
||||
grams: '{{ (([cur | float - (states(''input_number.sparkx_i7_spoolman_length_checkpoint'')
|
||||
| float(0)), 0] | max) * (states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.03))) | round(2) }}'
|
||||
color: '{{ states(''sensor.sparkx_i7_cfs_'' ~ (old_slot | lower | replace(''
|
||||
'', ''_'')) ~ ''_color'') | replace(''#'', '''') | lower }}'
|
||||
- variables:
|
||||
spool_id: '{% 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 %}{{ ns.id }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ grams | float > 0 }}'
|
||||
then:
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id not in ['''', ''unknown'', ''unavailable'']
|
||||
}}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ grams | float(0) }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ old_slot.split('' '')[-1] in [''1'', ''2'', ''3'',
|
||||
''4''] }}'
|
||||
then:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_slot_{{ old_slot.split(' ')[-1]
|
||||
}}_grams
|
||||
data:
|
||||
value: '{{ (states(''input_number.sparkx_i7_slot_'' ~ old_slot.split(''
|
||||
'')[-1] ~ ''_grams'') | float(0)) + (grams | float) }}'
|
||||
default:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Segment of {{ grams }} g from {{ old_slot }} (color #{{ color
|
||||
| upper }}) could not be deducted - no Spoolman spool in the CFS Lite
|
||||
location with remaining weight matches that color. Register the new
|
||||
roll in Spoolman with location CFS Lite, then adjust manually if needed.'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Segment of {{ grams }} g from {{ old_slot }} (color #{{ color
|
||||
| upper }}) could not be deducted - no Spoolman spool in the CFS Lite
|
||||
location with remaining weight matches that color. Register the new
|
||||
roll in Spoolman with location CFS Lite, then adjust manually if needed.'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Segment of {{ grams }} g from {{ old_slot }} (color #{{ color
|
||||
| upper }}) could not be deducted - no Spoolman spool in the CFS Lite
|
||||
location with remaining weight matches that color. Register the new
|
||||
roll in Spoolman with location CFS Lite, then adjust manually if needed.'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ new_slot }}'
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ old_slot in ['''', ''unknown'', ''unavailable''] and new_slot
|
||||
not in ['''', ''unknown'', ''unavailable''] }}'
|
||||
sequence:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ new_slot }}'
|
||||
mode: queued
|
||||
max: 10
|
||||
@@ -0,0 +1,152 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: '1791477238762'
|
||||
captured: '2026-10-12T16:31:20.387625+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238762'
|
||||
alias: SparkX i7 - Latch print spool for Spoolman
|
||||
description: 'Segment tracking for Spoolman: at print start resets the length checkpoint
|
||||
and per-slot gram counters and latches the active CFS slot. On every slot change
|
||||
mid-print, deducts the exact extrusion of the finished segment (used_material_length
|
||||
delta x g/cm) from the Spoolman spool in the CFS Lite location matching the previous
|
||||
slot color hex (only if that spool has remaining weight), accumulates grams per
|
||||
slot, notifies on no-match, then re-baselines the checkpoint and advances the
|
||||
latch.'
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
to: printing
|
||||
id: print_started
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_active_filament_slot
|
||||
id: slot_changed
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
state: printing
|
||||
actions:
|
||||
- variables:
|
||||
new_slot: '{{ states(''sensor.sparkx_i7_active_filament_slot'') }}'
|
||||
old_slot: '{{ states(''input_text.sparkx_i7_print_spool_latch'') }}'
|
||||
cur: '{{ states(''sensor.sparkx_i7_used_material_length'') | float(0) }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: trigger
|
||||
id: print_started
|
||||
sequence:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id:
|
||||
- input_number.sparkx_i7_slot_1_grams
|
||||
- input_number.sparkx_i7_slot_2_grams
|
||||
- input_number.sparkx_i7_slot_3_grams
|
||||
- input_number.sparkx_i7_slot_4_grams
|
||||
data:
|
||||
value: 0
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ new_slot if new_slot not in [''unknown'', ''unavailable''] else
|
||||
'''' }}'
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ old_slot not in ['''', ''unknown'', ''unavailable''] and
|
||||
new_slot not in ['''', ''unknown'', ''unavailable''] and new_slot != old_slot
|
||||
}}'
|
||||
sequence:
|
||||
- variables:
|
||||
grams: '{{ (([cur | float - (states(''input_number.sparkx_i7_spoolman_length_checkpoint'')
|
||||
| float(0)), 0] | max) * (states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.03))) | round(2) }}'
|
||||
color: '{{ states(''sensor.sparkx_i7_cfs_'' ~ (old_slot | lower | replace(''
|
||||
'', ''_'')) ~ ''_color'') | replace(''#'', '''') | lower }}'
|
||||
- variables:
|
||||
spool_id: '{% 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 %}{{ ns.id }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ grams | float > 0 }}'
|
||||
then:
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id not in ['''', ''unknown'', ''unavailable'']
|
||||
}}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ grams | float(0) }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ old_slot.split('' '')[-1] in [''1'', ''2'', ''3'',
|
||||
''4''] }}'
|
||||
then:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_slot_{{ old_slot.split(' ')[-1]
|
||||
}}_grams
|
||||
data:
|
||||
value: '{{ (states(''input_number.sparkx_i7_slot_'' ~ old_slot.split(''
|
||||
'')[-1] ~ ''_grams'') | float(0)) + (grams | float) }}'
|
||||
default:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Segment of {{ grams }} g from {{ old_slot }} (color #{{ color
|
||||
| upper }}) could not be deducted - no Spoolman spool in the CFS Lite
|
||||
location with remaining weight matches that color. Register the new
|
||||
roll in Spoolman with location CFS Lite, then adjust manually if needed.'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Segment of {{ grams }} g from {{ old_slot }} (color #{{ color
|
||||
| upper }}) could not be deducted - no Spoolman spool in the CFS Lite
|
||||
location with remaining weight matches that color. Register the new
|
||||
roll in Spoolman with location CFS Lite, then adjust manually if needed.'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Segment of {{ grams }} g from {{ old_slot }} (color #{{ color
|
||||
| upper }}) could not be deducted - no Spoolman spool in the CFS Lite
|
||||
location with remaining weight matches that color. Register the new
|
||||
roll in Spoolman with location CFS Lite, then adjust manually if needed.'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ new_slot }}'
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ old_slot in ['''', ''unknown'', ''unavailable''] and new_slot
|
||||
not in ['''', ''unknown'', ''unavailable''] }}'
|
||||
sequence:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ new_slot }}'
|
||||
mode: queued
|
||||
max: 10
|
||||
@@ -0,0 +1,152 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: '1791477238762'
|
||||
captured: '2026-10-15T13:23:53.053853+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238762'
|
||||
alias: SparkX i7 - Latch print spool for Spoolman
|
||||
description: 'Segment tracking for Spoolman: at print start resets the length checkpoint
|
||||
and per-slot gram counters and latches the active CFS slot. On every slot change
|
||||
mid-print, deducts the exact extrusion of the finished segment (used_material_length
|
||||
delta x g/cm) from the Spoolman spool in the CFS Lite location matching the previous
|
||||
slot color hex (only if that spool has remaining weight), accumulates grams per
|
||||
slot, notifies on no-match, then re-baselines the checkpoint and advances the
|
||||
latch.'
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
to: printing
|
||||
id: print_started
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_active_filament_slot
|
||||
id: slot_changed
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
state: printing
|
||||
actions:
|
||||
- variables:
|
||||
new_slot: '{{ states(''sensor.sparkx_i7_active_filament_slot'') }}'
|
||||
old_slot: '{{ states(''input_text.sparkx_i7_print_spool_latch'') }}'
|
||||
cur: '{{ states(''sensor.sparkx_i7_used_material_length'') | float(0) }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: trigger
|
||||
id: print_started
|
||||
sequence:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id:
|
||||
- input_number.sparkx_i7_slot_1_grams
|
||||
- input_number.sparkx_i7_slot_2_grams
|
||||
- input_number.sparkx_i7_slot_3_grams
|
||||
- input_number.sparkx_i7_slot_4_grams
|
||||
data:
|
||||
value: 0
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ new_slot if new_slot not in [''unknown'', ''unavailable''] else
|
||||
'''' }}'
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ old_slot not in ['''', ''unknown'', ''unavailable''] and
|
||||
new_slot not in ['''', ''unknown'', ''unavailable''] and new_slot != old_slot
|
||||
}}'
|
||||
sequence:
|
||||
- variables:
|
||||
grams: '{{ (([cur | float - (states(''input_number.sparkx_i7_spoolman_length_checkpoint'')
|
||||
| float(0)), 0] | max) * (states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.03))) | round(2) }}'
|
||||
color: '{{ states(''sensor.sparkx_i7_cfs_'' ~ (old_slot | lower | replace(''
|
||||
'', ''_'')) ~ ''_color'') | replace(''#'', '''') | lower }}'
|
||||
- variables:
|
||||
spool_id: '{% 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 '' ~ old_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
|
||||
%}{{ ns.id }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ grams | float > 0 }}'
|
||||
then:
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id not in ['''', ''unknown'', ''unavailable'']
|
||||
}}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ grams | float(0) }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ old_slot.split(''_'')[-1] in [''1'', ''2'', ''3'',
|
||||
''4''] }}'
|
||||
then:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_slot_{{ old_slot.split('_')[-1]
|
||||
}}_grams
|
||||
data:
|
||||
value: '{{ (states(''input_number.sparkx_i7_slot_'' ~ old_slot.split(''_'')[-1]
|
||||
~ ''_grams'') | float(0)) + (grams | float) }}'
|
||||
default:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Segment of {{ grams }} g from {{ old_slot }} (color #{{ color
|
||||
| upper }}) could not be deducted - no Spoolman spool in the CFS Lite
|
||||
location with remaining weight matches that color. Register the new
|
||||
roll in Spoolman with location CFS Lite, then adjust manually if needed.'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Segment of {{ grams }} g from {{ old_slot }} (color #{{ color
|
||||
| upper }}) could not be deducted - no Spoolman spool in the CFS Lite
|
||||
location with remaining weight matches that color. Register the new
|
||||
roll in Spoolman with location CFS Lite, then adjust manually if needed.'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Segment of {{ grams }} g from {{ old_slot }} (color #{{ color
|
||||
| upper }}) could not be deducted - no Spoolman spool in the CFS Lite
|
||||
location with remaining weight matches that color. Register the new
|
||||
roll in Spoolman with location CFS Lite, then adjust manually if needed.'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ new_slot }}'
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ old_slot in ['''', ''unknown'', ''unavailable''] and new_slot
|
||||
not in ['''', ''unknown'', ''unavailable''] }}'
|
||||
sequence:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ new_slot }}'
|
||||
mode: queued
|
||||
max: 10
|
||||
@@ -0,0 +1,122 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: '1791477238799'
|
||||
captured: '2026-10-15T13:23:53.149869+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238799'
|
||||
alias: SparkX i7 - Filament sufficiency check at print start
|
||||
description: When a print starts and stays printing for 45 s, reports how much filament
|
||||
the job needs, how much has already been used and how much is left, then compares
|
||||
the loaded CFS Lite spools against that. A single-colour job whose colour is in
|
||||
a loaded slot is checked exactly against that slot's spool; otherwise the slicer
|
||||
gives no per-colour figure, so each loaded spool is compared against the whole
|
||||
job total. Always sends a notification.
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
to: printing
|
||||
for: 00:00:45
|
||||
conditions: []
|
||||
actions:
|
||||
- variables:
|
||||
gcm: '{{ states(''input_number.sparkx_i7_filament_g_cm'') | float(0.0298) }}'
|
||||
length_cm: '{{ states(''sensor.sparkx_i7_expected_material_length'') | float(0)
|
||||
}}'
|
||||
weight_g: '{{ states(''sensor.sparkx_i7_expected_material_weight'') | float(0)
|
||||
}}'
|
||||
job_g: '{{ ((weight_g | float) if (weight_g | float) > 0 else (length_cm | float)
|
||||
* (gcm | float)) | round(1) }}'
|
||||
used_len: '{{ states(''sensor.sparkx_i7_used_material_length'') | float(0) }}'
|
||||
used_g: '{{ (((used_len | float) * (gcm | float)) | round(1)) }}'
|
||||
gcode_file: '{{ state_attr(''sensor.sparkx_i7_expected_material_length'', ''gcode_file'')
|
||||
| default('''', true) }}'
|
||||
- variables:
|
||||
report: "{% set cols = namespace(list=[]) %}\n{% for n in ['1','2','3','4']\
|
||||
\ %}{% set cc = states('sensor.sparkx_i7_cfs_box_1_slot_' ~ n ~ '_color')\
|
||||
\ | replace('#','') | lower %}{% if cc not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set cols.list = cols.list + [cc] %}{% endif %}{% endfor %}\n{% set\
|
||||
\ gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}{% if q not in ['','none','unknown','unavailable'] %}{%\
|
||||
\ set gc.list = gc.list + [q] %}{% endif %}{% endfor %}\n{% set mc = namespace(list=[])\
|
||||
\ %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','material')\
|
||||
\ | default('', true) | string).split(';') %}{% set q = p | trim %}{% if q\
|
||||
\ not in ['','none','unknown','unavailable'] %}{% set mc.list = mc.list +\
|
||||
\ [q] %}{% endif %}{% endfor %}\n{% set single = (gc.list | length) == 1 %}\n\
|
||||
{% set gcol = gc.list[0] if single else '' %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot if\
|
||||
\ aslot in ['1','2','3','4'] else '' %}\n{% set rem_g = ([((job_g | float)\
|
||||
\ - (used_g | float)), 0] | max) | round(1) %}\n{% set ns = namespace(cover=[],\
|
||||
\ below=[], short=[], ok=[], missing=[], loaded=[], match_label='', match_rem=0)\
|
||||
\ %}\n{% for n in ['1','2','3','4'] %}\n{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_'\
|
||||
\ ~ n ~ '_color') | replace('#','') | lower %}\n{% if c not in ['','none','unknown','unavailable']\
|
||||
\ %}\n{% set cname = states('sensor.sparkx_i7_slot_' ~ n ~ '_color_name')\
|
||||
\ %}\n{% set flabel = states('sensor.sparkx_i7_cfs_box_1_slot_' ~ n ~ '_filament')\
|
||||
\ %}\n{% set label = 'Slot ' ~ n ~ ' ' ~ (cname if cname not in ['','unknown','unavailable']\
|
||||
\ else (flabel if flabel not in ['','unknown','unavailable'] else ('#' ~ (c\
|
||||
\ | upper)))) %}\n{% set sp = namespace(id='', rem=0, fw=0) %}\n{% for e in\
|
||||
\ integration_entities('spoolman') if e.endswith('_color_hex') %}\n{% if sp.id\
|
||||
\ == '' and (state_attr(e[:-10],'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10] %}\n{% set sp.rem = states(e[:-10])\
|
||||
\ | float(0) %}\n{% set sp.fw = state_attr(e[:-10],'filament_weight') | float(0)\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set pct = ((((sp.rem | float) / (sp.fw\
|
||||
\ | float)) * 100) | round(0) | int) if (sp.fw | float) > 0 else 0 %}\n{%\
|
||||
\ if sp.id != '' %}{% set ns.loaded = ns.loaded + [label ~ ': ' ~ (sp.rem\
|
||||
\ | round(1)) ~ ' g (' ~ pct ~ '%)'] %}{% endif %}\n{% if sp.id != '' and\
|
||||
\ single and n == aslot %}{% set ns.match_label = label %}{% set ns.match_rem\
|
||||
\ = sp.rem %}{% endif %}\n{% if sp.id != '' %}\n{% if single and n == aslot\
|
||||
\ %}\n{% if (sp.rem | float) < (job_g | float) %}{% set ns.short = ns.short\
|
||||
\ + [label ~ ': ' ~ (sp.rem | round(1)) ~ ' g (' ~ pct ~ '%) left, ' ~ job_g\
|
||||
\ ~ ' g needed'] %}\n{% else %}{% set ns.ok = ns.ok + [label ~ ': ' ~ (sp.rem\
|
||||
\ | round(1)) ~ ' g (' ~ pct ~ '%) left, ' ~ job_g ~ ' g needed'] %}{% endif\
|
||||
\ %}\n{% elif single %}\n{% if (sp.rem | float) >= (job_g | float) %}{% set\
|
||||
\ ns.cover = ns.cover + [label ~ ': ' ~ (sp.rem | round(1)) ~ ' g (' ~ pct\
|
||||
\ ~ '%)'] %}\n{% else %}{% set ns.below = ns.below + [label ~ ': ' ~ (sp.rem\
|
||||
\ | round(1)) ~ ' g (' ~ pct ~ '%)'] %}{% endif %}\n{% else %}\n{% if (sp.rem\
|
||||
\ | float) < (job_g | float) %}{% set ns.short = ns.short + [label ~ ': '\
|
||||
\ ~ (sp.rem | round(1)) ~ ' g (' ~ pct ~ '%) left, up to ' ~ job_g ~ ' g needed']\
|
||||
\ %}\n{% else %}{% set ns.ok = ns.ok + [label ~ ': ' ~ (sp.rem | round(1))\
|
||||
\ ~ ' g (' ~ pct ~ '%) left, up to ' ~ job_g ~ ' g needed'] %}{% endif %}\n\
|
||||
{% endif %}\n{% elif job_g > 0 %}\n{% set ns.missing = ns.missing + [label\
|
||||
\ ~ ' (#' ~ (c | upper) ~ ')'] %}\n{% endif %}\n{% endif %}\n{% endfor %}\n\
|
||||
Job: {{ gcode_file if gcode_file not in ['','unknown','unavailable'] else\
|
||||
\ (state_attr('sensor.sparkx_i7_print_status','file') | default('', true)\
|
||||
\ | string).split('/')[-1] }}\nNeeds {{ job_g | round(1) }} g ({{ length_cm\
|
||||
\ | round(1) }} cm) \xB7 used {{ used_g }} g \xB7 {{ rem_g }} g left to print\n\
|
||||
Slicer: {{ (mc.list | join(', ')) if mc.list else 'material unknown' }} \xB7\
|
||||
\ {{ ('single colour #' ~ (gcol | upper)) if single else ((gc.list | length)\
|
||||
\ ~ ' colours') }}\n{% if job_g <= 0 %}Cannot verify: slicer filament estimate\
|
||||
\ not available yet.{% if ns.loaded %}\nLoaded:\n- {{ ns.loaded | join('\\\
|
||||
n- ') }}{% endif %}\n{% elif single and aslot != '' %}\n{% if ns.short %}NOT\
|
||||
\ ENOUGH filament:\n- {{ ns.short | join('\\n- ') }}\n{% elif ns.match_label\
|
||||
\ %}Enough filament: {{ ns.match_label }}: {{ ns.match_rem | round(1) }} g\
|
||||
\ left, {{ job_g }} g needed.\n{% else %}Active slot {{ aslot }} has no Spoolman\
|
||||
\ spool at CFS Lite, so remaining cannot be checked.{% endif %}\n{% elif single\
|
||||
\ %}No exact colour match for the print colour #{{ gcol | upper }} in a loaded\
|
||||
\ CFS slot, so the exact spool cannot be identified.{% if ns.cover %}\nWould\
|
||||
\ cover {{ job_g }} g:\n- {{ ns.cover | join('\\n- ') }}{% endif %}{% if ns.below\
|
||||
\ %}\nBelow {{ job_g }} g:\n- {{ ns.below | join('\\n- ') }}{% endif %}{%\
|
||||
\ if not ns.cover and not ns.below %}\nNo loaded CFS slot has a matching Spoolman\
|
||||
\ spool to compare.{% endif %}\n{% elif ns.short %}NOT ENOUGH filament - possible\
|
||||
\ shortfall:\n- {{ ns.short | join('\\n- ') }}{% if ns.ok %}\nOK (would still\
|
||||
\ cover the whole job):\n- {{ ns.ok | join('\\n- ') }}{% endif %}{% if ns.missing\
|
||||
\ %}\nNo Spoolman spool matched for:\n- {{ ns.missing | join('\\n- ') }}{%\
|
||||
\ endif %}\n{% elif ns.ok %}Enough filament:\n- {{ ns.ok | join('\\n- ') }}{%\
|
||||
\ if ns.missing %}\nNo Spoolman spool matched for:\n- {{ ns.missing | join('\\\
|
||||
n- ') }}{% endif %}\n{% elif ns.missing %}Could not match any loaded CFS slot\
|
||||
\ to a Spoolman spool.{% endif %}"
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: Print started - filament check
|
||||
message: '{{ report }}'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: Print started - filament check
|
||||
message: '{{ report }}'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: Print started - filament check
|
||||
message: '{{ report }}'
|
||||
mode: single
|
||||
@@ -0,0 +1,39 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.3d_print_complete_snapshot
|
||||
captured: '2026-10-03T15:16:22.651698+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1787462132503'
|
||||
alias: 3D Print Complete Snapshot - Telegram
|
||||
description: Sends a Telegram photo with a SparkX i7 camera snapshot when a print
|
||||
finishes successfully. Mobile completion notifications are handled by the Creality
|
||||
integration.
|
||||
triggers:
|
||||
- entity_id: sensor.sparkx_i7_print_status
|
||||
from: printing
|
||||
to: completed
|
||||
trigger: state
|
||||
actions:
|
||||
- variables:
|
||||
completion_message: '{% set file = trigger.to_state.attributes.get(''file'',
|
||||
'''') %} {% set name = ''Print'' if file in ['''', none, ''unknown'', ''unavailable'']
|
||||
else file.split(''/'')[-1].replace(''.gcode'', '''') %} {% set seconds = trigger.to_state.attributes.get(''job_time_s'',
|
||||
0) | int(0) %} {{ name }} finished successfully at {{ now().strftime(''%I:%M
|
||||
%p'').lstrip(''0'') }}. Total time: {% if seconds >= 3600 %}{{ seconds //
|
||||
3600 }}h {{ ((seconds % 3600) // 60) }}m {% else %}{{ ((seconds % 3600) //
|
||||
60) }}m{% endif %}'
|
||||
- action: camera.snapshot
|
||||
data:
|
||||
filename: /config/www/sparkx_i7_complete_snapshot.jpg
|
||||
target:
|
||||
entity_id: camera.sparkx_i7_printer_camera
|
||||
- action: telegram_bot.send_photo
|
||||
data:
|
||||
caption: '{{ completion_message }}'
|
||||
file: /config/www/sparkx_i7_complete_snapshot.jpg
|
||||
parse_mode: plain_text
|
||||
target:
|
||||
entity_id: notify.franco
|
||||
mode: single
|
||||
@@ -0,0 +1,78 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.3d_print_complete_snapshot
|
||||
captured: '2026-10-03T15:17:03.603772+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1787462132503'
|
||||
alias: 3D Print Complete Snapshot - Telegram
|
||||
description: Sends a Telegram photo with a SparkX i7 camera snapshot when a print
|
||||
finishes successfully. Mobile completion notifications are handled by the Creality
|
||||
integration.
|
||||
triggers:
|
||||
- entity_id: sensor.sparkx_i7_print_status
|
||||
from: printing
|
||||
to: completed
|
||||
trigger: state
|
||||
actions:
|
||||
- variables:
|
||||
completion_message: '{% set file = trigger.to_state.attributes.get(''file'',
|
||||
'''') %} {% set name = ''Print'' if file in ['''', none, ''unknown'', ''unavailable'']
|
||||
else file.split(''/'')[-1].replace(''.gcode'', '''') %} {% set seconds = trigger.to_state.attributes.get(''job_time_s'',
|
||||
0) | int(0) %} {{ name }} finished successfully at {{ now().strftime(''%I:%M
|
||||
%p'').lstrip(''0'') }}. Total time: {% if seconds >= 3600 %}{{ seconds //
|
||||
3600 }}h {{ ((seconds % 3600) // 60) }}m {% else %}{{ ((seconds % 3600) //
|
||||
60) }}m{% endif %}'
|
||||
- action: camera.snapshot
|
||||
data:
|
||||
filename: /config/www/sparkx_i7_complete_snapshot.jpg
|
||||
target:
|
||||
entity_id: camera.sparkx_i7_printer_camera
|
||||
- variables:
|
||||
sparkx_needs_light: '{{ not is_state(''light.sparkx_i7_light'', ''on'') }}'
|
||||
bedroom_needs_light: '{{ not is_state(''light.bedroom_lamp_2'', ''on'') }}'
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ sparkx_needs_light }}'
|
||||
then:
|
||||
- action: light.turn_on
|
||||
continue_on_error: true
|
||||
target:
|
||||
entity_id: light.sparkx_i7_light
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ bedroom_needs_light }}'
|
||||
then:
|
||||
- action: light.turn_on
|
||||
continue_on_error: true
|
||||
target:
|
||||
entity_id: light.bedroom_lamp_2
|
||||
- delay:
|
||||
seconds: 3
|
||||
- delay:
|
||||
seconds: 2
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ sparkx_needs_light }}'
|
||||
then:
|
||||
- action: light.turn_off
|
||||
continue_on_error: true
|
||||
target:
|
||||
entity_id: light.sparkx_i7_light
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ bedroom_needs_light }}'
|
||||
then:
|
||||
- action: light.turn_off
|
||||
continue_on_error: true
|
||||
target:
|
||||
entity_id: light.bedroom_lamp_2
|
||||
- action: telegram_bot.send_photo
|
||||
data:
|
||||
caption: '{{ completion_message }}'
|
||||
file: /config/www/sparkx_i7_complete_snapshot.jpg
|
||||
parse_mode: plain_text
|
||||
target:
|
||||
entity_id: notify.franco
|
||||
mode: single
|
||||
@@ -0,0 +1,126 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.3d_print_early_layers_snapshot
|
||||
captured: '2026-10-01T23:47:05.577959+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1787462157568'
|
||||
alias: 3D Print Early Layers Snapshot
|
||||
description: Telegram-only snapshots from all 3 printer cameras. Fires when Z crosses
|
||||
1.0 mm, then again at 25%, 50% and 75% print progress. Lights the SparkX i7 and
|
||||
bedroom lamp only if they are currently off, then restores whatever state they
|
||||
were in before capturing.
|
||||
triggers:
|
||||
- above: 1
|
||||
entity_id: sensor.sparkx_i7_position_z
|
||||
trigger: numeric_state
|
||||
- above: 25
|
||||
entity_id: sensor.sparkx_i7_print_progress
|
||||
trigger: numeric_state
|
||||
- above: 50
|
||||
entity_id: sensor.sparkx_i7_print_progress
|
||||
trigger: numeric_state
|
||||
- above: 75
|
||||
entity_id: sensor.sparkx_i7_print_progress
|
||||
trigger: numeric_state
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
state: printing
|
||||
actions:
|
||||
- variables:
|
||||
milestone: '{% set source = trigger.get(''entity_id'', '''') %} {% set tstate
|
||||
= trigger.get(''to_state'') %} {% set value = tstate.state | float(0) if tstate
|
||||
else 0 %} {% if source == ''sensor.sparkx_i7_position_z'' %} First layers
|
||||
(Z {{ value }} mm) {% elif source == ''sensor.sparkx_i7_print_progress'' %}
|
||||
{% if value >= 75 %} 75% complete {% elif value >= 50 %} 50% complete {% else
|
||||
%} 25% complete {% endif %} {% else %} Manual test {% endif %}'
|
||||
tag: '{% set source = trigger.get(''entity_id'', '''') %} {% if source == ''sensor.sparkx_i7_position_z''
|
||||
%} z1 {% elif source == ''sensor.sparkx_i7_print_progress'' %} p{{ trigger.get(''above'',
|
||||
0) | int }} {% else %} test {% endif %}'
|
||||
- variables:
|
||||
bedroom_needs_light: '{{ not is_state(''light.bedroom_lamp_2'', ''on'') }}'
|
||||
message: "{% set file = state_attr('sensor.sparkx_i7_print_status', 'file')\
|
||||
\ or '' %} {% set name = 'Print' if file in ['', none, 'unknown', 'unavailable']\
|
||||
\ else file.split('/')[-1].replace('.gcode', '') %} {% set pct = states('sensor.sparkx_i7_print_progress')\
|
||||
\ | int(0) %} {% set left = states('sensor.sparkx_i7_print_time_left') | int(0)\
|
||||
\ %} 3D print \xB7 {{ milestone }} \xB7 {{ name }} at {{ pct }}%{% if left\
|
||||
\ > 0 %} \xB7 {{ (left // 3600) }}h {{ ((left % 3600) // 60) }}m left{% endif\
|
||||
\ %}"
|
||||
sparkx_needs_light: '{{ not is_state(''light.sparkx_i7_light'', ''on'') }}'
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ sparkx_needs_light }}'
|
||||
then:
|
||||
- action: light.turn_on
|
||||
continue_on_error: true
|
||||
target:
|
||||
entity_id: light.sparkx_i7_light
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ bedroom_needs_light }}'
|
||||
then:
|
||||
- action: light.turn_on
|
||||
continue_on_error: true
|
||||
target:
|
||||
entity_id: light.bedroom_lamp_2
|
||||
- delay:
|
||||
seconds: 3
|
||||
- parallel:
|
||||
- action: camera.snapshot
|
||||
data:
|
||||
filename: /config/www/sparkx_{{ tag }}.jpg
|
||||
target:
|
||||
entity_id: camera.sparkx_i7_printer_camera
|
||||
- action: camera.snapshot
|
||||
data:
|
||||
filename: /config/www/ender5_{{ tag }}.jpg
|
||||
target:
|
||||
entity_id: camera.endercamera_duckdns_org
|
||||
- action: camera.snapshot
|
||||
data:
|
||||
filename: /config/www/ender_cam2_{{ tag }}.jpg
|
||||
target:
|
||||
entity_id: camera.endercamera2_duckdns_org
|
||||
- delay:
|
||||
seconds: 2
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ sparkx_needs_light }}'
|
||||
then:
|
||||
- action: light.turn_off
|
||||
continue_on_error: true
|
||||
target:
|
||||
entity_id: light.sparkx_i7_light
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ bedroom_needs_light }}'
|
||||
then:
|
||||
- action: light.turn_off
|
||||
continue_on_error: true
|
||||
target:
|
||||
entity_id: light.bedroom_lamp_2
|
||||
- action: telegram_bot.send_photo
|
||||
data:
|
||||
caption: "SparkX i7 \u2014 {{ message }}"
|
||||
file: /config/www/sparkx_{{ tag }}.jpg
|
||||
parse_mode: plain_text
|
||||
target:
|
||||
entity_id: notify.franco
|
||||
- action: telegram_bot.send_photo
|
||||
data:
|
||||
caption: "Back Camera \u2014 {{ message }}"
|
||||
file: /config/www/ender5_{{ tag }}.jpg
|
||||
parse_mode: plain_text
|
||||
target:
|
||||
entity_id: notify.franco
|
||||
- action: telegram_bot.send_photo
|
||||
data:
|
||||
caption: "Bed Camera \u2014 {{ message }}"
|
||||
file: /config/www/ender_cam2_{{ tag }}.jpg
|
||||
parse_mode: plain_text
|
||||
target:
|
||||
entity_id: notify.franco
|
||||
max: 4
|
||||
mode: parallel
|
||||
@@ -0,0 +1,122 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.3d_print_early_layers_snapshot
|
||||
captured: '2026-10-01T23:49:31.000350+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1787462157568'
|
||||
alias: 3D Print Early Layers Snapshot
|
||||
description: Telegram-only snapshots from all 3 printer cameras. Fires when Z crosses
|
||||
1.0 mm, then again at 25%, 50% and 75% print progress. Lights the SparkX i7 and
|
||||
bedroom lamp only if they are currently off, then restores whatever state they
|
||||
were in before capturing.
|
||||
triggers:
|
||||
- above: 5
|
||||
entity_id: sensor.sparkx_i7_print_progress
|
||||
trigger: numeric_state
|
||||
- above: 25
|
||||
entity_id: sensor.sparkx_i7_print_progress
|
||||
trigger: numeric_state
|
||||
- above: 50
|
||||
entity_id: sensor.sparkx_i7_print_progress
|
||||
trigger: numeric_state
|
||||
- above: 75
|
||||
entity_id: sensor.sparkx_i7_print_progress
|
||||
trigger: numeric_state
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
state: printing
|
||||
actions:
|
||||
- variables:
|
||||
milestone: '{% set above = trigger.get(''above'', 0) | int(0) %}{% if above
|
||||
>= 75 %} 75% complete{% elif above >= 50 %} 50% complete{% elif above >= 25
|
||||
%} 25% complete{% elif above >= 5 %} 5% complete{% else %} Print progress
|
||||
{{ above }}%{% endif %}'
|
||||
tag: p{{ trigger.get('above', 0) | int(0) }}
|
||||
- variables:
|
||||
bedroom_needs_light: '{{ not is_state(''light.bedroom_lamp_2'', ''on'') }}'
|
||||
message: "{% set file = state_attr('sensor.sparkx_i7_print_status', 'file')\
|
||||
\ or '' %} {% set name = 'Print' if file in ['', none, 'unknown', 'unavailable']\
|
||||
\ else file.split('/')[-1].replace('.gcode', '') %} {% set pct = states('sensor.sparkx_i7_print_progress')\
|
||||
\ | int(0) %} {% set left = states('sensor.sparkx_i7_print_time_left') | int(0)\
|
||||
\ %} 3D print \xB7 {{ milestone }} \xB7 {{ name }} at {{ pct }}%{% if left\
|
||||
\ > 0 %} \xB7 {{ (left // 3600) }}h {{ ((left % 3600) // 60) }}m left{% endif\
|
||||
\ %}"
|
||||
sparkx_needs_light: '{{ not is_state(''light.sparkx_i7_light'', ''on'') }}'
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ sparkx_needs_light }}'
|
||||
then:
|
||||
- action: light.turn_on
|
||||
continue_on_error: true
|
||||
target:
|
||||
entity_id: light.sparkx_i7_light
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ bedroom_needs_light }}'
|
||||
then:
|
||||
- action: light.turn_on
|
||||
continue_on_error: true
|
||||
target:
|
||||
entity_id: light.bedroom_lamp_2
|
||||
- delay:
|
||||
seconds: 3
|
||||
- parallel:
|
||||
- action: camera.snapshot
|
||||
data:
|
||||
filename: /config/www/sparkx_{{ tag }}.jpg
|
||||
target:
|
||||
entity_id: camera.sparkx_i7_printer_camera
|
||||
- action: camera.snapshot
|
||||
data:
|
||||
filename: /config/www/ender5_{{ tag }}.jpg
|
||||
target:
|
||||
entity_id: camera.endercamera_duckdns_org
|
||||
- action: camera.snapshot
|
||||
data:
|
||||
filename: /config/www/ender_cam2_{{ tag }}.jpg
|
||||
target:
|
||||
entity_id: camera.endercamera2_duckdns_org
|
||||
- delay:
|
||||
seconds: 2
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ sparkx_needs_light }}'
|
||||
then:
|
||||
- action: light.turn_off
|
||||
continue_on_error: true
|
||||
target:
|
||||
entity_id: light.sparkx_i7_light
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: '{{ bedroom_needs_light }}'
|
||||
then:
|
||||
- action: light.turn_off
|
||||
continue_on_error: true
|
||||
target:
|
||||
entity_id: light.bedroom_lamp_2
|
||||
- action: telegram_bot.send_photo
|
||||
data:
|
||||
caption: "SparkX i7 \u2014 {{ message }}"
|
||||
file: /config/www/sparkx_{{ tag }}.jpg
|
||||
parse_mode: plain_text
|
||||
target:
|
||||
entity_id: notify.franco
|
||||
- action: telegram_bot.send_photo
|
||||
data:
|
||||
caption: "Back Camera \u2014 {{ message }}"
|
||||
file: /config/www/ender5_{{ tag }}.jpg
|
||||
parse_mode: plain_text
|
||||
target:
|
||||
entity_id: notify.franco
|
||||
- action: telegram_bot.send_photo
|
||||
data:
|
||||
caption: "Bed Camera \u2014 {{ message }}"
|
||||
file: /config/www/ender_cam2_{{ tag }}.jpg
|
||||
parse_mode: plain_text
|
||||
target:
|
||||
entity_id: notify.franco
|
||||
max: 4
|
||||
mode: parallel
|
||||
@@ -0,0 +1,25 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.basement_temperature_change
|
||||
captured: '2026-10-04T23:32:18.963450+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1781793117883'
|
||||
alias: Basement Temperature Change
|
||||
description: ''
|
||||
triggers:
|
||||
- trigger: numeric_state
|
||||
entity_id: sensor.basement_temperature
|
||||
above: 15
|
||||
- trigger: numeric_state
|
||||
entity_id: sensor.basement_temperature
|
||||
below: 10
|
||||
conditions: []
|
||||
actions:
|
||||
- action: notify.notify
|
||||
metadata: {}
|
||||
data:
|
||||
title: Basement Temperature Change
|
||||
message: Basement Temperature Changed!
|
||||
mode: single
|
||||
@@ -0,0 +1,34 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.cfs_box_1_desiccant_pack_due
|
||||
captured: '2026-10-02T20:48:40.265891+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1790973987624'
|
||||
alias: CFS Box 1 - Desiccant Pack Due
|
||||
description: 'Notify when the SparkX i7 CFS box 1 humidity stays at or above 34%
|
||||
|
||||
for 60 minutes, meaning the desiccant pack needs replacing. The short spikes
|
||||
|
||||
that happen when the box is opened to swap a filament never last that long.'
|
||||
triggers:
|
||||
- above: 33.9
|
||||
entity_id: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
for:
|
||||
minutes: 60
|
||||
trigger: numeric_state
|
||||
actions:
|
||||
- action: notify.notify
|
||||
data:
|
||||
message: CFS box 1 humidity has been {{ reading }}% or higher for 60 minutes
|
||||
(threshold 34%). Time to replace the desiccant pack.
|
||||
title: 'CFS Box 1: replace desiccant pack'
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
message: CFS box 1 humidity has been {{ reading }}% or higher for 60 minutes
|
||||
(threshold 34%). Time to replace the desiccant pack.
|
||||
title: 'CFS Box 1: replace desiccant pack'
|
||||
mode: single
|
||||
variables:
|
||||
reading: '{{ trigger.to_state.state | float | round(0) | int }}'
|
||||
@@ -0,0 +1,34 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.printer_finished
|
||||
captured: '2026-10-10T06:45:42.166180+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791614551939'
|
||||
alias: Printer finished
|
||||
description: Sets the job filament helper and notifies when the print reaches 98%
|
||||
completion.
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_moonraker_progress
|
||||
to: '98'
|
||||
conditions: []
|
||||
actions:
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.job_filament
|
||||
data:
|
||||
value: '{{ states.sensor.sparkx_moonraker_filament_used.state_with_unit }}'
|
||||
- action: notify.franco
|
||||
data:
|
||||
message: TTS
|
||||
title: Printing complete
|
||||
data:
|
||||
tts_text: Print job is complete
|
||||
- action: notify.franco
|
||||
data:
|
||||
title: "\U0001F5A8 Printer finished"
|
||||
message: Printer job has finished
|
||||
data: {}
|
||||
mode: single
|
||||
@@ -0,0 +1,57 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.sparkx_i7_deduct_filament_in_spoolman_on_print_complete
|
||||
captured: '2026-10-08T16:34:33.721483+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238729'
|
||||
alias: SparkX i7 - Deduct filament in Spoolman on print complete
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
from: printing
|
||||
to: completed
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: '{{ states(''sensor.sparkx_i7_filament_weight_estimated'') | float(0)
|
||||
> 0 }}'
|
||||
actions:
|
||||
- variables:
|
||||
weight: '{{ states(''sensor.sparkx_i7_filament_weight_estimated'') | float(0)
|
||||
}}'
|
||||
spool_id: '{{ states(''input_text.sparkx_i7_print_spool_latch'') | int(0) }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id > 0 }}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ weight | float(0) }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: ''
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id <= 0 }}'
|
||||
sequence:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: Spoolman deduction skipped
|
||||
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||
\ latched for this print \u2014 nothing deducted."
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: Spoolman deduction skipped
|
||||
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||
\ latched for this print \u2014 nothing deducted."
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: Spoolman deduction skipped
|
||||
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||
\ latched for this print \u2014 nothing deducted."
|
||||
mode: single
|
||||
@@ -0,0 +1,57 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.sparkx_i7_deduct_filament_in_spoolman_on_print_complete
|
||||
captured: '2026-10-08T16:34:45.914807+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238729'
|
||||
alias: SparkX i7 - Deduct filament in Spoolman on print complete
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
from: printing
|
||||
to: completed
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: '{{ states(''sensor.sparkx_i7_filament_weight_estimated'') | float(0)
|
||||
> 0 }}'
|
||||
actions:
|
||||
- variables:
|
||||
weight: '{{ states(''sensor.sparkx_i7_filament_weight_estimated'') | float(0)
|
||||
}}'
|
||||
spool_id: '{{ states(''input_text.sparkx_i7_print_spool_latch'') | int(0) }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id > 0 }}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ weight | float(0) }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: ''
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id <= 0 }}'
|
||||
sequence:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: Spoolman deduction skipped
|
||||
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||
\ latched for this print \u2014 nothing deducted."
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: Spoolman deduction skipped
|
||||
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||
\ latched for this print \u2014 nothing deducted."
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: Spoolman deduction skipped
|
||||
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||
\ latched for this print \u2014 nothing deducted."
|
||||
mode: single
|
||||
@@ -0,0 +1,57 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.sparkx_i7_deduct_filament_in_spoolman_on_print_complete
|
||||
captured: '2026-10-08T17:47:57.827554+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238729'
|
||||
alias: SparkX i7 - Deduct filament in Spoolman on print complete
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
from: printing
|
||||
to: completed
|
||||
conditions:
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.sparkx_i7_filament_weight_estimated
|
||||
above: 0
|
||||
actions:
|
||||
- variables:
|
||||
weight: '{{ states(''sensor.sparkx_i7_filament_weight_estimated'') | float(0)
|
||||
}}'
|
||||
spool_id: '{{ states(''input_text.sparkx_i7_print_spool_latch'') | int(0) }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id > 0 }}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ weight | float(0) }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: ''
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id <= 0 }}'
|
||||
sequence:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: Spoolman deduction skipped
|
||||
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||
\ latched for this print \u2014 nothing deducted."
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: Spoolman deduction skipped
|
||||
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||
\ latched for this print \u2014 nothing deducted."
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: Spoolman deduction skipped
|
||||
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||
\ latched for this print \u2014 nothing deducted."
|
||||
mode: single
|
||||
@@ -0,0 +1,57 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.sparkx_i7_deduct_filament_in_spoolman_on_print_complete
|
||||
captured: '2026-10-08T17:49:35.306437+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238729'
|
||||
alias: SparkX i7 - Deduct filament in Spoolman on print complete
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
from: printing
|
||||
to: completed
|
||||
conditions:
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.sparkx_i7_filament_weight_estimated
|
||||
above: 0
|
||||
actions:
|
||||
- variables:
|
||||
weight: '{{ states(''sensor.sparkx_i7_filament_weight_estimated'') | float(0)
|
||||
}}'
|
||||
spool_id: '{{ states(''input_text.sparkx_i7_print_spool_latch'') | int(0) }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id > 0 }}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ weight | float(0) }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: ''
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id <= 0 }}'
|
||||
sequence:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: Spoolman deduction skipped
|
||||
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||
\ latched for this print \u2014 nothing deducted."
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: Spoolman deduction skipped
|
||||
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||
\ latched for this print \u2014 nothing deducted."
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: Spoolman deduction skipped
|
||||
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||
\ latched for this print \u2014 nothing deducted."
|
||||
mode: single
|
||||
@@ -0,0 +1,57 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.sparkx_i7_deduct_filament_in_spoolman_on_print_complete
|
||||
captured: '2026-10-08T17:50:27.997890+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238729'
|
||||
alias: SparkX i7 - Deduct filament in Spoolman on print complete
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
from: printing
|
||||
to: completed
|
||||
conditions:
|
||||
- condition: numeric_state
|
||||
entity_id: sensor.sparkx_i7_filament_weight_estimated
|
||||
above: 0
|
||||
actions:
|
||||
- variables:
|
||||
weight: '{{ states(''sensor.sparkx_i7_filament_weight_estimated'') | float(0)
|
||||
}}'
|
||||
spool_id: '{{ states(''input_text.sparkx_i7_print_spool_latch'') | int(0) }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id > 0 }}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ weight | float(0) }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: ''
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id <= 0 }}'
|
||||
sequence:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: Spoolman deduction skipped
|
||||
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||
\ latched for this print \u2014 nothing deducted."
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: Spoolman deduction skipped
|
||||
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||
\ latched for this print \u2014 nothing deducted."
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: Spoolman deduction skipped
|
||||
message: "Print completed: {{ weight }} g used, but no Spoolman spool was\
|
||||
\ latched for this print \u2014 nothing deducted."
|
||||
mode: single
|
||||
@@ -0,0 +1,141 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.sparkx_i7_deduct_filament_in_spoolman_on_print_complete
|
||||
captured: '2026-10-11T03:52:39.789581+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238729'
|
||||
alias: SparkX i7 - Deduct filament in Spoolman on print complete
|
||||
description: On print completion, deducts the final segment (used_material_length
|
||||
delta since last checkpoint x g/cm) from the Spoolman spool in the CFS Lite location
|
||||
matching the latched slot color (remaining weight > 0 guard), accumulates it per
|
||||
slot, then sends a summary notification with total and per-slot breakdown whenever
|
||||
anything was deducted. Silent when total is 0. Clears the latch and re-baselines
|
||||
the checkpoint.
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
from: printing
|
||||
to: completed
|
||||
conditions: []
|
||||
actions:
|
||||
- variables:
|
||||
old_slot: '{{ states(''input_text.sparkx_i7_print_spool_latch'') }}'
|
||||
cur: '{{ states(''sensor.sparkx_i7_used_material_length'') | float(0) }}'
|
||||
checkpoint: '{{ states(''input_number.sparkx_i7_spoolman_length_checkpoint'')
|
||||
| float(0) }}'
|
||||
- variables:
|
||||
final_grams: '{{ (([cur | float - (checkpoint | float), 0] | max) * (states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.03))) | round(2) }}'
|
||||
color: '{{ states(''sensor.sparkx_i7_cfs_'' ~ (old_slot | lower | replace(''
|
||||
'', ''_'')) ~ ''_color'') | replace(''#'', '''') | lower }}'
|
||||
- variables:
|
||||
spool_id: '{% 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 %}{{ ns.id }}'
|
||||
- variables:
|
||||
helper_idx: '{{ old_slot.split('' '')[-1] if old_slot.split('' '')[-1] in [''1'',
|
||||
''2'', ''3'', ''4''] else '''' }}'
|
||||
- variables:
|
||||
nonhelper_g: '{{ final_grams if (final_grams | float > 0) and (spool_id not
|
||||
in ['''', ''unknown'', ''unavailable'']) and (helper_idx == '''') else 0 }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ final_grams | float > 0 }}'
|
||||
then:
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id not in ['''', ''unknown'', ''unavailable'']
|
||||
}}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ final_grams | float(0) }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ helper_idx != '''' }}'
|
||||
then:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_slot_{{ helper_idx }}_grams
|
||||
data:
|
||||
value: '{{ (states(''input_number.sparkx_i7_slot_'' ~ helper_idx ~ ''_grams'')
|
||||
| float(0)) + (final_grams | float) }}'
|
||||
default:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print completed: final segment of {{ final_grams }} g from {{
|
||||
old_slot if old_slot else ''the active slot'' }} (color #{{ color | upper
|
||||
}}) could not be deducted - no Spoolman spool in the CFS Lite location
|
||||
with remaining weight matches that color. Register the new roll in Spoolman
|
||||
with location CFS Lite, then adjust manually if needed.'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print completed: final segment of {{ final_grams }} g from {{
|
||||
old_slot if old_slot else ''the active slot'' }} (color #{{ color | upper
|
||||
}}) could not be deducted - no Spoolman spool in the CFS Lite location
|
||||
with remaining weight matches that color. Register the new roll in Spoolman
|
||||
with location CFS Lite, then adjust manually if needed.'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print completed: final segment of {{ final_grams }} g from {{
|
||||
old_slot if old_slot else ''the active slot'' }} (color #{{ color | upper
|
||||
}}) could not be deducted - no Spoolman spool in the CFS Lite location
|
||||
with remaining weight matches that color. Register the new roll in Spoolman
|
||||
with location CFS Lite, then adjust manually if needed.'
|
||||
- variables:
|
||||
summary_total: '{% set ns = namespace(t = 0) %}{% for n in [''1'', ''2'', ''3'',
|
||||
''4''] %}{% set g = states(''input_number.sparkx_i7_slot_'' ~ n ~ ''_grams'')
|
||||
| float(0) %}{% if g > 0 %}{% set ns.t = ns.t + g %}{% endif %}{% endfor %}{{
|
||||
(ns.t + (nonhelper_g | float)) | round(1) }}'
|
||||
- variables:
|
||||
summary_lines: '{% set ns = namespace(l = []) %}{% for n in [''1'', ''2'', ''3'',
|
||||
''4''] %}{% set g = states(''input_number.sparkx_i7_slot_'' ~ n ~ ''_grams'')
|
||||
| float(0) %}{% if g > 0 %}{% set ns.l = ns.l + [''Slot '' ~ n ~ '' ('' ~
|
||||
states(''sensor.sparkx_i7_slot_'' ~ n ~ ''_color_name'') ~ ''): '' ~ (g |
|
||||
round(1)) ~ '' g''] %}{% endif %}{% endfor %}{% if nonhelper_g | float > 0
|
||||
%}{% set ns.l = ns.l + [(old_slot if old_slot else ''Unlatched'') ~ '': ''
|
||||
~ (nonhelper_g | float | round(1)) ~ '' g''] %}{% endif %}{{ ns.l | join(''\n'')
|
||||
}}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ summary_total | float > 0 }}'
|
||||
then:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: Print complete - Spoolman updated
|
||||
message: 'Print complete - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: Print complete - Spoolman updated
|
||||
message: 'Print complete - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: Print complete - Spoolman updated
|
||||
message: 'Print complete - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: ''
|
||||
mode: single
|
||||
@@ -0,0 +1,152 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.sparkx_i7_deduct_filament_in_spoolman_on_print_complete
|
||||
captured: '2026-10-12T01:04:58.210558+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238729'
|
||||
alias: SparkX i7 - Deduct filament in Spoolman on print complete
|
||||
description: On print completion, deducts the final segment (used_material_length
|
||||
delta since last checkpoint x g/cm) from the Spoolman spool in the CFS Lite location
|
||||
matching the latched slot color (remaining weight > 0 guard), accumulates it per
|
||||
slot, then sends a summary notification with total and per-slot breakdown whenever
|
||||
anything was deducted. Silent when total is 0. Clears the latch and re-baselines
|
||||
the checkpoint.
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
from: printing
|
||||
to: completed
|
||||
conditions: []
|
||||
actions:
|
||||
- variables:
|
||||
old_slot: '{{ states(''input_text.sparkx_i7_print_spool_latch'') }}'
|
||||
cur: '{{ states(''sensor.sparkx_i7_used_material_length'') | float(0) }}'
|
||||
checkpoint: '{{ states(''input_number.sparkx_i7_spoolman_length_checkpoint'')
|
||||
| float(0) }}'
|
||||
- variables:
|
||||
final_grams: '{{ (([cur | float - (checkpoint | float), 0] | max) * (states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.03))) | round(2) }}'
|
||||
color: '{{ states(''sensor.sparkx_i7_cfs_'' ~ (old_slot | lower | replace(''
|
||||
'', ''_'')) ~ ''_color'') | replace(''#'', '''') | lower }}'
|
||||
- variables:
|
||||
spool_id: '{% 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 %}{{ ns.id }}'
|
||||
- variables:
|
||||
helper_idx: '{{ old_slot.split('' '')[-1] if old_slot.split('' '')[-1] in [''1'',
|
||||
''2'', ''3'', ''4''] else '''' }}'
|
||||
- variables:
|
||||
nonhelper_g: '{{ final_grams if (final_grams | float > 0) and (spool_id not
|
||||
in ['''', ''unknown'', ''unavailable'']) and (helper_idx == '''') else 0 }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ final_grams | float > 0 }}'
|
||||
then:
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ spool_id not in ['''', ''unknown'', ''unavailable'']
|
||||
}}'
|
||||
sequence:
|
||||
- action: spoolman.use_spool_filament
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
use_weight: '{{ final_grams | float(0) }}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ helper_idx != '''' }}'
|
||||
then:
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_slot_{{ helper_idx }}_grams
|
||||
data:
|
||||
value: '{{ (states(''input_number.sparkx_i7_slot_'' ~ helper_idx ~ ''_grams'')
|
||||
| float(0)) + (final_grams | float) }}'
|
||||
default:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print completed: final segment of {{ final_grams }} g from {{
|
||||
old_slot if old_slot else ''the active slot'' }} (color #{{ color | upper
|
||||
}}) could not be deducted - no Spoolman spool in the CFS Lite location
|
||||
with remaining weight matches that color. Register the new roll in Spoolman
|
||||
with location CFS Lite, then adjust manually if needed.'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print completed: final segment of {{ final_grams }} g from {{
|
||||
old_slot if old_slot else ''the active slot'' }} (color #{{ color | upper
|
||||
}}) could not be deducted - no Spoolman spool in the CFS Lite location
|
||||
with remaining weight matches that color. Register the new roll in Spoolman
|
||||
with location CFS Lite, then adjust manually if needed.'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: 'Spoolman: no spool for slot color'
|
||||
message: 'Print completed: final segment of {{ final_grams }} g from {{
|
||||
old_slot if old_slot else ''the active slot'' }} (color #{{ color | upper
|
||||
}}) could not be deducted - no Spoolman spool in the CFS Lite location
|
||||
with remaining weight matches that color. Register the new roll in Spoolman
|
||||
with location CFS Lite, then adjust manually if needed.'
|
||||
- variables:
|
||||
summary_total: '{% set ns = namespace(t = 0) %}{% for n in [''1'', ''2'', ''3'',
|
||||
''4''] %}{% set g = states(''input_number.sparkx_i7_slot_'' ~ n ~ ''_grams'')
|
||||
| float(0) %}{% if g > 0 %}{% set ns.t = ns.t + g %}{% endif %}{% endfor %}{{
|
||||
(ns.t + (nonhelper_g | float)) | round(1) }}'
|
||||
- variables:
|
||||
summary_lines: '{% set ns = namespace(l = []) %}{% for n in [''1'', ''2'', ''3'',
|
||||
''4''] %}{% set g = states(''input_number.sparkx_i7_slot_'' ~ n ~ ''_grams'')
|
||||
| float(0) %}{% if g > 0 %}{% set ns.l = ns.l + [''Slot '' ~ n ~ '' ('' ~
|
||||
states(''sensor.sparkx_i7_slot_'' ~ n ~ ''_color_name'') ~ ''): '' ~ (g |
|
||||
round(1)) ~ '' g''] %}{% endif %}{% endfor %}{% if nonhelper_g | float > 0
|
||||
%}{% set ns.l = ns.l + [(old_slot if old_slot else ''Unlatched'') ~ '': ''
|
||||
~ (nonhelper_g | float | round(1)) ~ '' g''] %}{% endif %}{{ ns.l | join(''\n'')
|
||||
}}'
|
||||
- if:
|
||||
condition: template
|
||||
value_template: '{{ summary_total | float > 0 }}'
|
||||
then:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: Print complete - Spoolman updated
|
||||
message: 'Print complete - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: notify.mobile_app_francos_ipad
|
||||
data:
|
||||
title: Print complete - Spoolman updated
|
||||
message: 'Print complete - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: notify.mobile_app_sm_f956w
|
||||
data:
|
||||
title: Print complete - Spoolman updated
|
||||
message: 'Print complete - Spoolman deducted {{ summary_total }} g
|
||||
|
||||
{{ summary_lines }}'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_last_job_filament_weight
|
||||
data:
|
||||
value: '{{ final_grams }}'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_last_job_cost
|
||||
data:
|
||||
value: '{{ ((final_grams | float) * (states(''input_number.filament_price_per_kg'')
|
||||
| float(25)) / 1000) | round(2) }}'
|
||||
- action: input_number.set_value
|
||||
target:
|
||||
entity_id: input_number.sparkx_i7_spoolman_length_checkpoint
|
||||
data:
|
||||
value: '{{ cur }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: ''
|
||||
mode: single
|
||||
@@ -0,0 +1,53 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.sparkx_i7_latch_print_spool_for_spoolman
|
||||
captured: '2026-10-08T16:34:33.495188+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238762'
|
||||
alias: SparkX i7 - Latch print spool for Spoolman
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
to: printing
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_active_filament_slot
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- sensor.sparkx_i7_cfs_box_1_slot_1_color
|
||||
- sensor.sparkx_i7_cfs_box_1_slot_2_color
|
||||
- sensor.sparkx_i7_cfs_box_1_slot_3_color
|
||||
- sensor.sparkx_i7_cfs_box_1_slot_4_color
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
state: printing
|
||||
actions:
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ trigger.entity_id == ''sensor.sparkx_i7_print_status''
|
||||
}}'
|
||||
sequence:
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: ''
|
||||
- variables:
|
||||
spool_id: "{%- set slot = states('sensor.sparkx_i7_active_filament_slot') -%}\n\
|
||||
{%- set ce = 'sensor.sparkx_i7_cfs_' ~ (slot | lower | replace(' ', '_'))\
|
||||
\ ~ '_color' -%}\n{%- set color = states(ce) | replace('#', '') | lower -%}\n\
|
||||
{%- set ns = namespace(id = '') -%}\n{%- for e in integration_entities('spoolman')\
|
||||
\ -%}\n {%- if e.endswith('_color_hex') and (states(e) | lower) == color\
|
||||
\ -%}\n {%- set ns.id = states(e[:-10] ~ '_id') -%}\n {%- endif -%}\n\
|
||||
{%- endfor -%}\n{{ ns.id }}"
|
||||
- condition: template
|
||||
value_template: '{{ spool_id not in ['''', ''unknown'', ''unavailable''] }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ spool_id }}'
|
||||
mode: single
|
||||
@@ -0,0 +1,53 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.sparkx_i7_latch_print_spool_for_spoolman
|
||||
captured: '2026-10-08T16:34:46.060135+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238762'
|
||||
alias: SparkX i7 - Latch print spool for Spoolman
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
to: printing
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_active_filament_slot
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- sensor.sparkx_i7_cfs_box_1_slot_1_color
|
||||
- sensor.sparkx_i7_cfs_box_1_slot_2_color
|
||||
- sensor.sparkx_i7_cfs_box_1_slot_3_color
|
||||
- sensor.sparkx_i7_cfs_box_1_slot_4_color
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
state: printing
|
||||
actions:
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ trigger.entity_id == ''sensor.sparkx_i7_print_status''
|
||||
}}'
|
||||
sequence:
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: ''
|
||||
- variables:
|
||||
spool_id: "{%- set slot = states('sensor.sparkx_i7_active_filament_slot') -%}\n\
|
||||
{%- set ce = 'sensor.sparkx_i7_cfs_' ~ (slot | lower | replace(' ', '_'))\
|
||||
\ ~ '_color' -%}\n{%- set color = states(ce) | replace('#', '') | lower -%}\n\
|
||||
{%- set ns = namespace(id = '') -%}\n{%- for e in integration_entities('spoolman')\
|
||||
\ -%}\n {%- if e.endswith('_color_hex') and (states(e) | lower) == color\
|
||||
\ -%}\n {%- set ns.id = states(e[:-10] ~ '_id') -%}\n {%- endif -%}\n\
|
||||
{%- endfor -%}\n{{ ns.id }}"
|
||||
- condition: template
|
||||
value_template: '{{ spool_id not in ['''', ''unknown'', ''unavailable''] }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ spool_id }}'
|
||||
mode: single
|
||||
@@ -0,0 +1,53 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: automation
|
||||
entity_id: automation.sparkx_i7_latch_print_spool_for_spoolman
|
||||
captured: '2026-10-08T17:45:06.877265+00:00'
|
||||
tool: ha_config_set_automation
|
||||
config:
|
||||
id: '1791477238762'
|
||||
alias: SparkX i7 - Latch print spool for Spoolman
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
to: printing
|
||||
id: print_started
|
||||
- trigger: state
|
||||
entity_id: sensor.sparkx_i7_active_filament_slot
|
||||
- trigger: state
|
||||
entity_id:
|
||||
- sensor.sparkx_i7_cfs_box_1_slot_1_color
|
||||
- sensor.sparkx_i7_cfs_box_1_slot_2_color
|
||||
- sensor.sparkx_i7_cfs_box_1_slot_3_color
|
||||
- sensor.sparkx_i7_cfs_box_1_slot_4_color
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
state: printing
|
||||
actions:
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: trigger
|
||||
id: print_started
|
||||
sequence:
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: ''
|
||||
- variables:
|
||||
spool_id: "{%- set slot = states('sensor.sparkx_i7_active_filament_slot') -%}\n\
|
||||
{%- set ce = 'sensor.sparkx_i7_cfs_' ~ (slot | lower | replace(' ', '_'))\
|
||||
\ ~ '_color' -%}\n{%- set color = states(ce) | replace('#', '') | lower -%}\n\
|
||||
{%- set ns = namespace(id = '') -%}\n{%- for e in integration_entities('spoolman')\
|
||||
\ -%}\n {%- if e.endswith('_color_hex') and (states(e) | lower) == color\
|
||||
\ -%}\n {%- set ns.id = states(e[:-10] ~ '_id') -%}\n {%- endif -%}\n\
|
||||
{%- endfor -%}\n{{ ns.id }}"
|
||||
- condition: template
|
||||
value_template: '{{ spool_id not in ['''', ''unknown'', ''unavailable''] }}'
|
||||
- action: input_text.set_value
|
||||
target:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
data:
|
||||
value: '{{ spool_id }}'
|
||||
mode: single
|
||||
@@ -0,0 +1,205 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: 3d-printer-cellphone
|
||||
captured: '2026-10-15T17:11:00.335551+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- sections:
|
||||
- cards:
|
||||
- heading: Filament Usage
|
||||
heading_style: title
|
||||
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')\
|
||||
\ %}\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 v.border = '#d0d0d0' if hex_clean | lower in ['#ffffff',\
|
||||
\ '#fff'] else 'transparent' %}\n {% set v.html = \"<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 {% set v.label = 'Slot ' ~ n %}\n {% else %}\n {% set v.html\
|
||||
\ = \"<div class='tube-bg tube-empty'></div>\" %}\n {% set v.label\
|
||||
\ = \"<span class='slot-warn'>Slot \" ~ n ~ \" \u2014 empty</span>\" %}\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\": \"<div class='tube-wrap'>\"\
|
||||
\ ~ v.html ~ \"<div class='slot-label'>\" ~ v.label ~ \"</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 {\"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 \",\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_humidity
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:water-percent
|
||||
name: Humidity
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:thermometer
|
||||
name: Temperature
|
||||
type: tile
|
||||
- cards:
|
||||
- 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')\
|
||||
\ %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_'\
|
||||
\ ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce)\
|
||||
\ | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1)\
|
||||
\ %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex')\
|
||||
\ and (state_attr(e[:-10], 'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10]\
|
||||
\ ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif\
|
||||
\ %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No\
|
||||
\ slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{\
|
||||
\ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} \u2192 spool {{\
|
||||
\ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id\
|
||||
\ ~ '_filament_name') }} \xB7 {{ ns.rem | round(1) }} g left)\n{% endif\
|
||||
\ %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: full
|
||||
type: horizontal-stack
|
||||
- heading: Last/Current Print Job
|
||||
heading_style: title
|
||||
icon: mdi:printer-3d
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_used_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:plus-minus
|
||||
name: Used Material Total (cm)
|
||||
type: tile
|
||||
- entity: sensor.sparkx_moonraker_print_eta
|
||||
features_position: bottom
|
||||
name: Print ETA
|
||||
type: tile
|
||||
vertical: false
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:weight-gram
|
||||
name: Current Job Weight (est.)
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in\
|
||||
\ ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n\
|
||||
{% endif %}"
|
||||
icon_color: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if\
|
||||
\ st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif\
|
||||
\ %}"
|
||||
multiline_secondary: true
|
||||
primary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w\
|
||||
\ = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in\
|
||||
\ ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1)\
|
||||
\ }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight')\
|
||||
\ | float(0) | round(1) }} g\n{% endif %}\n"
|
||||
secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set\
|
||||
\ c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing',\
|
||||
\ 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){%\
|
||||
\ else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost')\
|
||||
\ | float(0) | round(2) }} $ (last job)\n{% endif %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
- heading: Temperature
|
||||
heading_style: title
|
||||
icon: mdi:coolant-temperature
|
||||
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: sensor.sparkx_i7_real_time_flow
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 20
|
||||
min: 0
|
||||
name: Flow
|
||||
severity:
|
||||
green: 0
|
||||
red: 12
|
||||
yellow: 6
|
||||
type: gauge
|
||||
type: grid
|
||||
type: sections
|
||||
@@ -0,0 +1,201 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: 3d-printer-cellphone
|
||||
captured: '2026-10-15T17:21:40.300831+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- sections:
|
||||
- cards:
|
||||
- heading: Filament Usage
|
||||
heading_style: title
|
||||
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')\
|
||||
\ %}\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 v.border = '#d0d0d0' if hex_clean | lower in ['#ffffff',\
|
||||
\ '#fff'] else 'transparent' %}\n {% set v.html = \"<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 {% set v.label = 'Slot ' ~ n %}\n {% else %}\n {% set v.html\
|
||||
\ = \"<div class='tube-bg tube-empty'></div>\" %}\n {% set v.label\
|
||||
\ = \"<span class='slot-warn'>Slot \" ~ n ~ \" \u2014 empty</span>\" %}\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\": \"<div class='tube-wrap'>\"\
|
||||
\ ~ v.html ~ \"<div class='slot-label'>\" ~ v.label ~ \"</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 {\"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 \",\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_humidity
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:water-percent
|
||||
name: Humidity
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:thermometer
|
||||
name: Temperature
|
||||
type: tile
|
||||
- cards:
|
||||
- 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')\
|
||||
\ %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_'\
|
||||
\ ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce)\
|
||||
\ | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1)\
|
||||
\ %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex')\
|
||||
\ and (state_attr(e[:-10], 'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10]\
|
||||
\ ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif\
|
||||
\ %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No\
|
||||
\ slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{\
|
||||
\ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} \u2192 spool {{\
|
||||
\ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id\
|
||||
\ ~ '_filament_name') }} \xB7 {{ ns.rem | round(1) }} g left)\n{% endif\
|
||||
\ %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: full
|
||||
type: horizontal-stack
|
||||
- heading: Last/Current Print Job
|
||||
heading_style: title
|
||||
icon: mdi:printer-3d
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_used_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:plus-minus
|
||||
name: Used Material Total
|
||||
type: tile
|
||||
- entity: sensor.sparkx_moonraker_print_eta
|
||||
features_position: bottom
|
||||
name: Print ETA
|
||||
type: tile
|
||||
vertical: false
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in\
|
||||
\ ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n\
|
||||
{% endif %}"
|
||||
icon_color: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if\
|
||||
\ st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif\
|
||||
\ %}"
|
||||
multiline_secondary: true
|
||||
primary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w\
|
||||
\ = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in\
|
||||
\ ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1)\
|
||||
\ }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight')\
|
||||
\ | float(0) | round(1) }} g\n{% endif %}\n"
|
||||
secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set\
|
||||
\ c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing',\
|
||||
\ 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){%\
|
||||
\ else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost')\
|
||||
\ | float(0) | round(2) }} $ (last job)\n{% endif %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
- heading: Temperature
|
||||
heading_style: title
|
||||
icon: mdi:coolant-temperature
|
||||
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: sensor.sparkx_i7_real_time_flow
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 40
|
||||
min: 0
|
||||
name: Flow
|
||||
severity:
|
||||
green: 0
|
||||
yellow: 12
|
||||
red: 24
|
||||
type: gauge
|
||||
type: grid
|
||||
type: sections
|
||||
@@ -0,0 +1,404 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: 3d-printer-cellphone
|
||||
captured: '2026-10-15T17:40:11.907712+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- sections:
|
||||
- cards:
|
||||
- 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 = \"<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 \
|
||||
\ {% set v.label = 'Slot ' ~ n ~ (' \u26A0' if band > 0 else '') %}\n\
|
||||
\ {% else %}\n {% set v.html = \"<div class='tube-bg tube-empty'></div>\"\
|
||||
\ %}\n {% set v.label = \"<span class='slot-warn'>Slot \" ~ n ~ \"\
|
||||
\ \u2014 empty</span>\" %}\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\": \"<div class='tube-wrap\" ~ v.wrap ~ \"'>\" ~ v.html\
|
||||
\ ~ \"<div class='slot-label'>\" ~ v.label ~ \"</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 {\"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_humidity
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:water-percent
|
||||
name: Humidity
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:thermometer
|
||||
name: Temperature
|
||||
type: tile
|
||||
- cards:
|
||||
- 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')\
|
||||
\ %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_'\
|
||||
\ ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce)\
|
||||
\ | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1)\
|
||||
\ %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex')\
|
||||
\ and (state_attr(e[:-10], 'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10]\
|
||||
\ ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif\
|
||||
\ %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No\
|
||||
\ slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{\
|
||||
\ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} \u2192 spool {{\
|
||||
\ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id\
|
||||
\ ~ '_filament_name') }} \xB7 {{ ns.rem | round(1) }} g left)\n{% endif\
|
||||
\ %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: full
|
||||
type: horizontal-stack
|
||||
- heading: Last/Current Print Job
|
||||
heading_style: title
|
||||
icon: mdi:printer-3d
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_used_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:plus-minus
|
||||
name: Used Material Total
|
||||
type: tile
|
||||
- entity: sensor.sparkx_moonraker_print_eta
|
||||
features_position: bottom
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
name: Print ETA
|
||||
type: tile
|
||||
vertical: false
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in\
|
||||
\ ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n\
|
||||
{% endif %}"
|
||||
icon_color: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if\
|
||||
\ st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif\
|
||||
\ %}"
|
||||
multiline_secondary: true
|
||||
primary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w\
|
||||
\ = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in\
|
||||
\ ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1)\
|
||||
\ }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight')\
|
||||
\ | float(0) | round(1) }} g\n{% endif %}\n"
|
||||
secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set\
|
||||
\ c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing',\
|
||||
\ 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){%\
|
||||
\ else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost')\
|
||||
\ | float(0) | round(2) }} $ (last job)\n{% endif %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
- entity: sensor.sparkx_i7_expected_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: mdi:scale-balance
|
||||
icon_color: '{% set gcm = states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.0298) %}
|
||||
|
||||
{% set lencm = states(''sensor.sparkx_i7_expected_material_length'') | float(0)
|
||||
%}
|
||||
|
||||
{% set wgt = states(''sensor.sparkx_i7_expected_material_weight'') | float(0)
|
||||
%}
|
||||
|
||||
{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}
|
||||
|
||||
{% set used_g = ((states(''sensor.sparkx_i7_used_material_length'') | float(0))
|
||||
* gcm) | round(1) %}
|
||||
|
||||
{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}
|
||||
|
||||
{% set gc = namespace(list=[]) %}
|
||||
|
||||
{% for p in (state_attr(''sensor.sparkx_i7_expected_material_length'',''color'')
|
||||
| default('''', true) | string).split('';'') %}
|
||||
|
||||
{% set q = p | replace(''#'','''') | lower | trim %}
|
||||
|
||||
{% if q not in ['''',''none'',''unknown'',''unavailable''] %}{% set gc.list
|
||||
= gc.list + [q] %}{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set single = (gc.list | length) == 1 %}
|
||||
|
||||
{% set aslot = (states(''sensor.sparkx_i7_active_filament_slot'') | default('''',
|
||||
true) | string).split(''_'')[-1] %}
|
||||
|
||||
{% set aslot = aslot if aslot in [''1'',''2'',''3'',''4''] else '''' %}
|
||||
|
||||
{% set s = namespace(short=false, ok=false, matched=0, active=false) %}
|
||||
|
||||
{% for n in [''1'',''2'',''3'',''4''] %}
|
||||
|
||||
{% set sp = namespace(id='''', rem=-1) %}
|
||||
|
||||
{% for e in integration_entities(''spoolman'') if e.endswith(''_color_hex'')
|
||||
%}
|
||||
|
||||
{% if sp.id == '''' and (state_attr(e[:-10],''location'') | default('''',
|
||||
true) | lower) == (''cfs lite '' ~ n) %}
|
||||
|
||||
{% set sp.id = e[:-10] %}
|
||||
|
||||
{% set sp.rem = states(e[:-10]) | float(-1) %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if sp.id != '''' and sp.rem >= 0 %}
|
||||
|
||||
{% set s.matched = s.matched + 1 %}
|
||||
|
||||
{% if single %}
|
||||
|
||||
{% if n == aslot %}
|
||||
|
||||
{% set s.active = true %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set v = namespace(state=''unknown'', label=''check unavailable'') %}
|
||||
|
||||
{% if job_g <= 0 %}
|
||||
|
||||
{% set v.state = ''none'' %}
|
||||
|
||||
{% set v.label = ''no slicer estimate yet'' %}
|
||||
|
||||
{% elif s.short %}
|
||||
|
||||
{% set v.state = ''short'' %}
|
||||
|
||||
{% set v.label = ''NOT ENOUGH'' %}
|
||||
|
||||
{% elif s.ok %}
|
||||
|
||||
{% set v.state = ''ok'' %}
|
||||
|
||||
{% set v.label = ''enough'' %}
|
||||
|
||||
{% elif single and aslot == '''' %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no active CFS slot'' %}
|
||||
|
||||
{% elif single and not s.active %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''active slot has no spool'' %}
|
||||
|
||||
{% elif s.matched == 0 %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no spool loaded'' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if v.state == ''ok'' %}green{% elif v.state == ''short'' %}red{% elif
|
||||
v.state == ''none'' %}grey{% else %}orange{% endif %}'
|
||||
multiline_secondary: true
|
||||
name: Filament Sufficiency
|
||||
primary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298)\
|
||||
\ %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set v = namespace(state='unknown', label='check\
|
||||
\ unavailable') %}\n{% if job_g <= 0 %}\n{% set v.state = 'none' %}\n{%\
|
||||
\ set v.label = 'no slicer estimate yet' %}\n{% elif s.short %}\n{% set\
|
||||
\ v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH' %}\n{% elif s.ok %}\n\
|
||||
{% set v.state = 'ok' %}\n{% set v.label = 'enough' %}\n{% elif single and\
|
||||
\ aslot == '' %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'no active\
|
||||
\ CFS slot' %}\n{% elif single and not s.active %}\n{% set v.state = 'unknown'\
|
||||
\ %}\n{% set v.label = 'active slot has no spool' %}\n{% elif s.matched\
|
||||
\ == 0 %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'no spool loaded'\
|
||||
\ %}\n{% endif %}\n{{ job_g }} g needed \xB7 {{ used_g }} g used"
|
||||
secondary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') |\
|
||||
\ float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set v = namespace(state='unknown', label='check\
|
||||
\ unavailable') %}\n{% if job_g <= 0 %}\n{% set v.state = 'none' %}\n{%\
|
||||
\ set v.label = 'no slicer estimate yet' %}\n{% elif s.short %}\n{% set\
|
||||
\ v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH' %}\n{% elif s.ok %}\n\
|
||||
{% set v.state = 'ok' %}\n{% set v.label = 'enough' %}\n{% elif single and\
|
||||
\ aslot == '' %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'no active\
|
||||
\ CFS slot' %}\n{% elif single and not s.active %}\n{% set v.state = 'unknown'\
|
||||
\ %}\n{% set v.label = 'active slot has no spool' %}\n{% elif s.matched\
|
||||
\ == 0 %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'no spool loaded'\
|
||||
\ %}\n{% endif %}\n{{ rem_g }} g left to print \xB7 {{ v.label }}"
|
||||
type: custom:mushroom-template-card
|
||||
- heading: Temperature
|
||||
heading_style: title
|
||||
icon: mdi:coolant-temperature
|
||||
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: sensor.sparkx_i7_real_time_flow
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 40
|
||||
min: 0
|
||||
name: Flow
|
||||
severity:
|
||||
green: 0
|
||||
red: 24
|
||||
yellow: 12
|
||||
type: gauge
|
||||
type: grid
|
||||
type: sections
|
||||
@@ -0,0 +1,421 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: 3d-printer-cellphone
|
||||
captured: '2026-10-15T21:01:06.734288+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- sections:
|
||||
- cards:
|
||||
- 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 = \"<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 \
|
||||
\ {% set v.label = 'Slot ' ~ n ~ (' \u26A0' if band > 0 else '') %}\n\
|
||||
\ {% else %}\n {% set v.html = \"<div class='tube-bg tube-empty'></div>\"\
|
||||
\ %}\n {% set v.label = \"<span class='slot-warn'>Slot \" ~ n ~ \"\
|
||||
\ \u2014 empty</span>\" %}\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\": \"<div class='tube-wrap\" ~ v.wrap ~ \"'>\" ~ v.html\
|
||||
\ ~ \"<div class='slot-label'>\" ~ v.label ~ \"</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 {\"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_humidity
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:water-percent
|
||||
name: Humidity
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:thermometer
|
||||
name: Temperature
|
||||
type: tile
|
||||
- cards:
|
||||
- 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')\
|
||||
\ %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_'\
|
||||
\ ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce)\
|
||||
\ | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1)\
|
||||
\ %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex')\
|
||||
\ and (state_attr(e[:-10], 'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10]\
|
||||
\ ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif\
|
||||
\ %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No\
|
||||
\ slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{\
|
||||
\ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} \u2192 spool {{\
|
||||
\ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id\
|
||||
\ ~ '_filament_name') }} \xB7 {{ ns.rem | round(1) }} g left)\n{% endif\
|
||||
\ %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: full
|
||||
type: horizontal-stack
|
||||
- heading: Last/Current Print Job
|
||||
heading_style: title
|
||||
icon: mdi:printer-3d
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_used_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:plus-minus
|
||||
name: Used Material Total
|
||||
type: tile
|
||||
- entity: sensor.sparkx_moonraker_print_eta
|
||||
features_position: bottom
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
name: Print ETA
|
||||
type: tile
|
||||
vertical: false
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in\
|
||||
\ ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n\
|
||||
{% endif %}"
|
||||
icon_color: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if\
|
||||
\ st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif\
|
||||
\ %}"
|
||||
multiline_secondary: true
|
||||
primary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w\
|
||||
\ = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in\
|
||||
\ ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1)\
|
||||
\ }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight')\
|
||||
\ | float(0) | round(1) }} g\n{% endif %}\n"
|
||||
secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set\
|
||||
\ c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing',\
|
||||
\ 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){%\
|
||||
\ else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost')\
|
||||
\ | float(0) | round(2) }} $ (last job)\n{% endif %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
- entity: sensor.sparkx_i7_expected_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: mdi:scale-balance
|
||||
icon_color: '{% set gcm = states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.0298) %}
|
||||
|
||||
{% set lencm = states(''sensor.sparkx_i7_expected_material_length'') | float(0)
|
||||
%}
|
||||
|
||||
{% set wgt = states(''sensor.sparkx_i7_expected_material_weight'') | float(0)
|
||||
%}
|
||||
|
||||
{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}
|
||||
|
||||
{% set used_g = ((states(''sensor.sparkx_i7_used_material_length'') | float(0))
|
||||
* gcm) | round(1) %}
|
||||
|
||||
{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}
|
||||
|
||||
{% set gc = namespace(list=[]) %}
|
||||
|
||||
{% for p in (state_attr(''sensor.sparkx_i7_expected_material_length'',''color'')
|
||||
| default('''', true) | string).split('';'') %}
|
||||
|
||||
{% set q = p | replace(''#'','''') | lower | trim %}
|
||||
|
||||
{% if q not in ['''',''none'',''unknown'',''unavailable''] %}{% set gc.list
|
||||
= gc.list + [q] %}{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set single = (gc.list | length) == 1 %}
|
||||
|
||||
{% set aslot = (states(''sensor.sparkx_i7_active_filament_slot'') | default('''',
|
||||
true) | string).split(''_'')[-1] %}
|
||||
|
||||
{% set aslot = aslot if aslot in [''1'',''2'',''3'',''4''] else '''' %}
|
||||
|
||||
{% set s = namespace(short=false, ok=false, matched=0, active=false) %}
|
||||
|
||||
{% for n in [''1'',''2'',''3'',''4''] %}
|
||||
|
||||
{% set sp = namespace(id='''', rem=-1) %}
|
||||
|
||||
{% for e in integration_entities(''spoolman'') if e.endswith(''_color_hex'')
|
||||
%}
|
||||
|
||||
{% if sp.id == '''' and (state_attr(e[:-10],''location'') | default('''',
|
||||
true) | lower) == (''cfs lite '' ~ n) %}
|
||||
|
||||
{% set sp.id = e[:-10] %}
|
||||
|
||||
{% set sp.rem = states(e[:-10]) | float(-1) %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if sp.id != '''' and sp.rem >= 0 %}
|
||||
|
||||
{% set s.matched = s.matched + 1 %}
|
||||
|
||||
{% if single %}
|
||||
|
||||
{% if n == aslot %}
|
||||
|
||||
{% set s.active = true %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set active = (states(''sensor.sparkx_i7_print_status'') | default('''',
|
||||
true)) in [''printing'',''paused''] %}
|
||||
|
||||
{% set v = namespace(state=''unknown'', label=''check unavailable'') %}
|
||||
|
||||
{% if not active %}
|
||||
|
||||
{% set v.state = ''idle'' %}
|
||||
|
||||
{% set v.label = ''no active print'' %}
|
||||
|
||||
{% elif job_g <= 0 %}
|
||||
|
||||
{% set v.state = ''none'' %}
|
||||
|
||||
{% set v.label = ''no slicer estimate yet'' %}
|
||||
|
||||
{% elif s.short %}
|
||||
|
||||
{% set v.state = ''short'' %}
|
||||
|
||||
{% set v.label = ''NOT ENOUGH'' %}
|
||||
|
||||
{% elif s.ok %}
|
||||
|
||||
{% set v.state = ''ok'' %}
|
||||
|
||||
{% set v.label = ''enough'' %}
|
||||
|
||||
{% elif single and aslot == '''' %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no active CFS slot'' %}
|
||||
|
||||
{% elif single and not s.active %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''active slot has no spool'' %}
|
||||
|
||||
{% elif s.matched == 0 %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no spool loaded'' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if v.state == ''ok'' %}green{% elif v.state == ''short'' %}red{% elif
|
||||
v.state in [''none'',''idle''] %}grey{% else %}orange{% endif %}'
|
||||
multiline_secondary: true
|
||||
name: Filament Sufficiency
|
||||
primary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298)\
|
||||
\ %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}no active print{% else %}{{ job_g }} g needed \xB7 {{ used_g }} g used{%\
|
||||
\ endif %}"
|
||||
secondary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') |\
|
||||
\ float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}last job: {{ job_g }} g needed{% else %}{{ rem_g }} g left to print\
|
||||
\ \xB7 {{ v.label }}{% endif %}"
|
||||
type: custom:mushroom-template-card
|
||||
- heading: Temperature
|
||||
heading_style: title
|
||||
icon: mdi:coolant-temperature
|
||||
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: sensor.sparkx_i7_real_time_flow
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 40
|
||||
min: 0
|
||||
name: Flow
|
||||
severity:
|
||||
green: 0
|
||||
red: 24
|
||||
yellow: 12
|
||||
type: gauge
|
||||
type: grid
|
||||
type: sections
|
||||
@@ -0,0 +1,428 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: 3d-printer-cellphone
|
||||
captured: '2026-10-16T14:03:14.258687+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- sections:
|
||||
- cards:
|
||||
- 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='', 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 = \"\
|
||||
<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 {% set v.label = 'Slot ' ~ n ~\
|
||||
\ (' \u26A0' if band > 0 else '') %}\n {% else %}\n {% set v.html\
|
||||
\ = \"<div class='tube-bg tube-empty'></div>\" %}\n {% set v.label\
|
||||
\ = \"<span class='slot-warn'>Slot \" ~ n ~ \" \u2014 empty</span>\" %}\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\": \"<div class='tube-wrap\"\
|
||||
\ ~ v.wrap ~ \"'>\" ~ v.html ~ \"<div class='slot-label'>\" ~ v.label\
|
||||
\ ~ \"</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 {\"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
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:water-percent
|
||||
name: Humidity
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:thermometer
|
||||
name: Temperature
|
||||
type: tile
|
||||
- cards:
|
||||
- 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')\
|
||||
\ %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_'\
|
||||
\ ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce)\
|
||||
\ | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1)\
|
||||
\ %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex')\
|
||||
\ and (state_attr(e[:-10], 'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10]\
|
||||
\ ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif\
|
||||
\ %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No\
|
||||
\ slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{\
|
||||
\ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} \u2192 spool {{\
|
||||
\ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id\
|
||||
\ ~ '_filament_name') }} \xB7 {{ ns.rem | round(1) }} g left)\n{% endif\
|
||||
\ %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: full
|
||||
type: horizontal-stack
|
||||
- heading: Last/Current Print Job
|
||||
heading_style: title
|
||||
icon: mdi:printer-3d
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_used_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:plus-minus
|
||||
name: Used Material Total
|
||||
type: tile
|
||||
- entity: sensor.sparkx_moonraker_print_eta
|
||||
features_position: bottom
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
name: Print ETA
|
||||
type: tile
|
||||
vertical: false
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in\
|
||||
\ ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n\
|
||||
{% endif %}"
|
||||
icon_color: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if\
|
||||
\ st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif\
|
||||
\ %}"
|
||||
multiline_secondary: true
|
||||
primary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w\
|
||||
\ = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in\
|
||||
\ ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1)\
|
||||
\ }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight')\
|
||||
\ | float(0) | round(1) }} g\n{% endif %}\n"
|
||||
secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set\
|
||||
\ c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing',\
|
||||
\ 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){%\
|
||||
\ else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost')\
|
||||
\ | float(0) | round(2) }} $ (last job)\n{% endif %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
- entity: sensor.sparkx_i7_expected_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: mdi:scale-balance
|
||||
icon_color: '{% set gcm = states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.0298) %}
|
||||
|
||||
{% set lencm = states(''sensor.sparkx_i7_expected_material_length'') | float(0)
|
||||
%}
|
||||
|
||||
{% set wgt = states(''sensor.sparkx_i7_expected_material_weight'') | float(0)
|
||||
%}
|
||||
|
||||
{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}
|
||||
|
||||
{% set used_g = ((states(''sensor.sparkx_i7_used_material_length'') | float(0))
|
||||
* gcm) | round(1) %}
|
||||
|
||||
{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}
|
||||
|
||||
{% set gc = namespace(list=[]) %}
|
||||
|
||||
{% for p in (state_attr(''sensor.sparkx_i7_expected_material_length'',''color'')
|
||||
| default('''', true) | string).split('';'') %}
|
||||
|
||||
{% set q = p | replace(''#'','''') | lower | trim %}
|
||||
|
||||
{% if q not in ['''',''none'',''unknown'',''unavailable''] %}{% set gc.list
|
||||
= gc.list + [q] %}{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set single = (gc.list | length) == 1 %}
|
||||
|
||||
{% set aslot = (states(''sensor.sparkx_i7_active_filament_slot'') | default('''',
|
||||
true) | string).split(''_'')[-1] %}
|
||||
|
||||
{% set aslot = aslot if aslot in [''1'',''2'',''3'',''4''] else '''' %}
|
||||
|
||||
{% set s = namespace(short=false, ok=false, matched=0, active=false) %}
|
||||
|
||||
{% for n in [''1'',''2'',''3'',''4''] %}
|
||||
|
||||
{% set sp = namespace(id='''', rem=-1) %}
|
||||
|
||||
{% for e in integration_entities(''spoolman'') if e.endswith(''_color_hex'')
|
||||
%}
|
||||
|
||||
{% if sp.id == '''' and (state_attr(e[:-10],''location'') | default('''',
|
||||
true) | lower) == (''cfs lite '' ~ n) %}
|
||||
|
||||
{% set sp.id = e[:-10] %}
|
||||
|
||||
{% set sp.rem = states(e[:-10]) | float(-1) %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if sp.id != '''' and sp.rem >= 0 %}
|
||||
|
||||
{% set s.matched = s.matched + 1 %}
|
||||
|
||||
{% if single %}
|
||||
|
||||
{% if n == aslot %}
|
||||
|
||||
{% set s.active = true %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set active = (states(''sensor.sparkx_i7_print_status'') | default('''',
|
||||
true)) in [''printing'',''paused''] %}
|
||||
|
||||
{% set v = namespace(state=''unknown'', label=''check unavailable'') %}
|
||||
|
||||
{% if not active %}
|
||||
|
||||
{% set v.state = ''idle'' %}
|
||||
|
||||
{% set v.label = ''no active print'' %}
|
||||
|
||||
{% elif job_g <= 0 %}
|
||||
|
||||
{% set v.state = ''none'' %}
|
||||
|
||||
{% set v.label = ''no slicer estimate yet'' %}
|
||||
|
||||
{% elif s.short %}
|
||||
|
||||
{% set v.state = ''short'' %}
|
||||
|
||||
{% set v.label = ''NOT ENOUGH'' %}
|
||||
|
||||
{% elif s.ok %}
|
||||
|
||||
{% set v.state = ''ok'' %}
|
||||
|
||||
{% set v.label = ''enough'' %}
|
||||
|
||||
{% elif single and aslot == '''' %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no active CFS slot'' %}
|
||||
|
||||
{% elif single and not s.active %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''active slot has no spool'' %}
|
||||
|
||||
{% elif s.matched == 0 %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no spool loaded'' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if v.state == ''ok'' %}green{% elif v.state == ''short'' %}red{% elif
|
||||
v.state in [''none'',''idle''] %}grey{% else %}orange{% endif %}'
|
||||
multiline_secondary: true
|
||||
name: Filament Sufficiency
|
||||
primary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298)\
|
||||
\ %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}no active print{% else %}{{ job_g }} g needed \xB7 {{ used_g }} g used{%\
|
||||
\ endif %}"
|
||||
secondary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') |\
|
||||
\ float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}last job: {{ job_g }} g needed{% else %}{{ rem_g }} g left to print\
|
||||
\ \xB7 {{ v.label }}{% endif %}"
|
||||
type: custom:mushroom-template-card
|
||||
- heading: Temperature
|
||||
heading_style: title
|
||||
icon: mdi:coolant-temperature
|
||||
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: sensor.sparkx_i7_real_time_flow
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 40
|
||||
min: 0
|
||||
name: Flow
|
||||
severity:
|
||||
green: 0
|
||||
red: 24
|
||||
yellow: 12
|
||||
type: gauge
|
||||
type: grid
|
||||
type: sections
|
||||
@@ -0,0 +1,433 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: 3d-printer-cellphone
|
||||
captured: '2026-10-16T20:11:26.000588+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- sections:
|
||||
- cards:
|
||||
- card:
|
||||
columns: 4
|
||||
square: false
|
||||
type: grid
|
||||
card_param: cards
|
||||
filter:
|
||||
template: "{% set ns = namespace(cards=[]) %}{% set active_n = (states('sensor.sparkx_i7_active_filament_slot').split('_')[-1]\
|
||||
\ | int(0)) if states('sensor.sparkx_i7_print_status') in ['printing',\
|
||||
\ 'paused'] else 0 %}\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 '') %}{% set v.wrap = v.wrap ~ ' active' if (n == active_n)\
|
||||
\ else v.wrap %}\n {% set v.border = '#d0d0d0' if hex_clean | lower\
|
||||
\ in ['#ffffff', '#fff'] else 'transparent' %}\n {% set v.html = \"\
|
||||
<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 {% set v.label = 'Slot ' ~ n ~\
|
||||
\ (' \u26A0' if band > 0 else '') %}\n {% else %}\n {% set v.html\
|
||||
\ = \"<div class='tube-bg tube-empty'></div>\" %}\n {% set v.label\
|
||||
\ = \"<span class='slot-warn'>Slot \" ~ n ~ \" \u2014 empty</span>\" %}\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\": \"<div class='tube-wrap\"\
|
||||
\ ~ v.wrap ~ \"'>\" ~ v.html ~ \"<div class='slot-label'>\" ~ v.label\
|
||||
\ ~ \"</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 {\"flex-direction\"\
|
||||
: \"column\"},\n {\"align-items\": \"center\"}\n ]\n \
|
||||
\ }\n },\n \"extra_styles\": \"\n .tube-wrap.active .tube-bg\
|
||||
\ { box-shadow: 0 0 10px 2px var(--primary-color); } .tube-wrap.active\
|
||||
\ .slot-label { color: var(--primary-color); font-weight: 800; } \
|
||||
\ .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
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:water-percent
|
||||
name: Humidity
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:thermometer
|
||||
name: Temperature
|
||||
type: tile
|
||||
- cards:
|
||||
- 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')\
|
||||
\ %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_'\
|
||||
\ ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce)\
|
||||
\ | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1)\
|
||||
\ %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex')\
|
||||
\ and (state_attr(e[:-10], 'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10]\
|
||||
\ ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif\
|
||||
\ %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No\
|
||||
\ slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{\
|
||||
\ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} \u2192 spool {{\
|
||||
\ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id\
|
||||
\ ~ '_filament_name') }} \xB7 {{ ns.rem | round(1) }} g left)\n{% endif\
|
||||
\ %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: full
|
||||
type: horizontal-stack
|
||||
- heading: Last/Current Print Job
|
||||
heading_style: title
|
||||
icon: mdi:printer-3d
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_used_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:plus-minus
|
||||
name: Used Material Total
|
||||
type: tile
|
||||
- entity: sensor.sparkx_moonraker_print_eta
|
||||
features_position: bottom
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
name: Print ETA
|
||||
type: tile
|
||||
vertical: false
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in\
|
||||
\ ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n\
|
||||
{% endif %}"
|
||||
icon_color: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if\
|
||||
\ st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif\
|
||||
\ %}"
|
||||
multiline_secondary: true
|
||||
primary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w\
|
||||
\ = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in\
|
||||
\ ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1)\
|
||||
\ }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight')\
|
||||
\ | float(0) | round(1) }} g\n{% endif %}\n"
|
||||
secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set\
|
||||
\ c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing',\
|
||||
\ 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){%\
|
||||
\ else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost')\
|
||||
\ | float(0) | round(2) }} $ (last job)\n{% endif %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
- entity: sensor.sparkx_i7_expected_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: mdi:scale-balance
|
||||
icon_color: '{% set gcm = states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.0298) %}
|
||||
|
||||
{% set lencm = states(''sensor.sparkx_i7_expected_material_length'') | float(0)
|
||||
%}
|
||||
|
||||
{% set wgt = states(''sensor.sparkx_i7_expected_material_weight'') | float(0)
|
||||
%}
|
||||
|
||||
{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}
|
||||
|
||||
{% set used_g = ((states(''sensor.sparkx_i7_used_material_length'') | float(0))
|
||||
* gcm) | round(1) %}
|
||||
|
||||
{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}
|
||||
|
||||
{% set gc = namespace(list=[]) %}
|
||||
|
||||
{% for p in (state_attr(''sensor.sparkx_i7_expected_material_length'',''color'')
|
||||
| default('''', true) | string).split('';'') %}
|
||||
|
||||
{% set q = p | replace(''#'','''') | lower | trim %}
|
||||
|
||||
{% if q not in ['''',''none'',''unknown'',''unavailable''] %}{% set gc.list
|
||||
= gc.list + [q] %}{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set single = (gc.list | length) == 1 %}
|
||||
|
||||
{% set aslot = (states(''sensor.sparkx_i7_active_filament_slot'') | default('''',
|
||||
true) | string).split(''_'')[-1] %}
|
||||
|
||||
{% set aslot = aslot if aslot in [''1'',''2'',''3'',''4''] else '''' %}
|
||||
|
||||
{% set s = namespace(short=false, ok=false, matched=0, active=false) %}
|
||||
|
||||
{% for n in [''1'',''2'',''3'',''4''] %}
|
||||
|
||||
{% set sp = namespace(id='''', rem=-1) %}
|
||||
|
||||
{% for e in integration_entities(''spoolman'') if e.endswith(''_color_hex'')
|
||||
%}
|
||||
|
||||
{% if sp.id == '''' and (state_attr(e[:-10],''location'') | default('''',
|
||||
true) | lower) == (''cfs lite '' ~ n) %}
|
||||
|
||||
{% set sp.id = e[:-10] %}
|
||||
|
||||
{% set sp.rem = states(e[:-10]) | float(-1) %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if sp.id != '''' and sp.rem >= 0 %}
|
||||
|
||||
{% set s.matched = s.matched + 1 %}
|
||||
|
||||
{% if single %}
|
||||
|
||||
{% if n == aslot %}
|
||||
|
||||
{% set s.active = true %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set active = (states(''sensor.sparkx_i7_print_status'') | default('''',
|
||||
true)) in [''printing'',''paused''] %}
|
||||
|
||||
{% set v = namespace(state=''unknown'', label=''check unavailable'') %}
|
||||
|
||||
{% if not active %}
|
||||
|
||||
{% set v.state = ''idle'' %}
|
||||
|
||||
{% set v.label = ''no active print'' %}
|
||||
|
||||
{% elif job_g <= 0 %}
|
||||
|
||||
{% set v.state = ''none'' %}
|
||||
|
||||
{% set v.label = ''no slicer estimate yet'' %}
|
||||
|
||||
{% elif s.short %}
|
||||
|
||||
{% set v.state = ''short'' %}
|
||||
|
||||
{% set v.label = ''NOT ENOUGH'' %}
|
||||
|
||||
{% elif s.ok %}
|
||||
|
||||
{% set v.state = ''ok'' %}
|
||||
|
||||
{% set v.label = ''enough'' %}
|
||||
|
||||
{% elif single and aslot == '''' %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no active CFS slot'' %}
|
||||
|
||||
{% elif single and not s.active %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''active slot has no spool'' %}
|
||||
|
||||
{% elif s.matched == 0 %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no spool loaded'' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if v.state == ''ok'' %}green{% elif v.state == ''short'' %}red{% elif
|
||||
v.state in [''none'',''idle''] %}grey{% else %}orange{% endif %}'
|
||||
multiline_secondary: true
|
||||
name: Filament Sufficiency
|
||||
primary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298)\
|
||||
\ %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}no active print{% else %}{{ job_g }} g needed \xB7 {{ used_g }} g used{%\
|
||||
\ endif %}"
|
||||
secondary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') |\
|
||||
\ float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}last job: {{ job_g }} g needed{% else %}{{ rem_g }} g left to print\
|
||||
\ \xB7 {{ v.label }}{% endif %}"
|
||||
type: custom:mushroom-template-card
|
||||
- heading: Temperature
|
||||
heading_style: title
|
||||
icon: mdi:coolant-temperature
|
||||
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: sensor.sparkx_i7_real_time_flow
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 40
|
||||
min: 0
|
||||
name: Flow
|
||||
severity:
|
||||
green: 0
|
||||
red: 24
|
||||
yellow: 12
|
||||
type: gauge
|
||||
type: grid
|
||||
type: sections
|
||||
@@ -0,0 +1,501 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: 3d-printer-cellphone
|
||||
captured: '2026-10-16T20:13:44.170829+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- sections:
|
||||
- cards:
|
||||
- card:
|
||||
columns: 4
|
||||
square: false
|
||||
type: grid
|
||||
card_param: cards
|
||||
filter:
|
||||
template: "{% set ns = namespace(cards=[]) %}{% set active_n = (states('sensor.sparkx_i7_active_filament_slot').split('_')[-1]\
|
||||
\ | int(0)) if states('sensor.sparkx_i7_print_status') in ['printing',\
|
||||
\ 'paused'] else 0 %}\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 '') %}{% set v.wrap = v.wrap ~ ' active' if (n == active_n)\
|
||||
\ else v.wrap %}\n {% set v.border = '#d0d0d0' if hex_clean | lower\
|
||||
\ in ['#ffffff', '#fff'] else 'transparent' %}\n {% set v.html = \"\
|
||||
<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 {% set v.label = 'Slot ' ~ n ~\
|
||||
\ (' \u26A0' if band > 0 else '') %}\n {% else %}\n {% set v.html\
|
||||
\ = \"<div class='tube-bg tube-empty'></div>\" %}\n {% set v.label\
|
||||
\ = \"<span class='slot-warn'>Slot \" ~ n ~ \" \u2014 empty</span>\" %}\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\": \"<div class='tube-wrap\"\
|
||||
\ ~ v.wrap ~ \"'>\" ~ v.html ~ \"<div class='slot-label'>\" ~ v.label\
|
||||
\ ~ \"</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 {\"flex-direction\"\
|
||||
: \"column\"},\n {\"align-items\": \"center\"}\n ]\n \
|
||||
\ }\n },\n \"extra_styles\": \"\n .tube-wrap.active .tube-bg\
|
||||
\ { box-shadow: 0 0 10px 2px var(--primary-color); } .tube-wrap.active\
|
||||
\ .slot-label { color: var(--primary-color); font-weight: 800; } \
|
||||
\ .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
|
||||
- type: horizontal-stack
|
||||
grid_options:
|
||||
columns: full
|
||||
cards:
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_1_color
|
||||
name: Slot 1
|
||||
icon: mdi:printer-filament
|
||||
multiline_secondary: true
|
||||
primary: ''
|
||||
secondary: '{% 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) %}This print so far: {{ live | round(1) }} g{% else %}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
|
||||
name: Slot 2
|
||||
icon: mdi:printer-filament
|
||||
multiline_secondary: true
|
||||
primary: ''
|
||||
secondary: '{% 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) %}This print so far: {{ live | round(1) }} g{% else %}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
|
||||
name: Slot 3
|
||||
icon: mdi:printer-filament
|
||||
multiline_secondary: true
|
||||
primary: ''
|
||||
secondary: '{% 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) %}This print so far: {{ live | round(1) }} g{% else %}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
|
||||
name: Slot 4
|
||||
icon: mdi:printer-filament
|
||||
multiline_secondary: true
|
||||
primary: ''
|
||||
secondary: '{% 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) %}This print so far: {{ live | round(1) }} g{% else %}Last print:
|
||||
{{ (states(''input_number.sparkx_i7_slot_4_grams'') | float(0)) | round(1)
|
||||
}} g{% endif %}'
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:water-percent
|
||||
name: Humidity
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:thermometer
|
||||
name: Temperature
|
||||
type: tile
|
||||
- cards:
|
||||
- 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')\
|
||||
\ %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_'\
|
||||
\ ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce)\
|
||||
\ | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1)\
|
||||
\ %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex')\
|
||||
\ and (state_attr(e[:-10], 'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10]\
|
||||
\ ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif\
|
||||
\ %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No\
|
||||
\ slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{\
|
||||
\ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} \u2192 spool {{\
|
||||
\ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id\
|
||||
\ ~ '_filament_name') }} \xB7 {{ ns.rem | round(1) }} g left)\n{% endif\
|
||||
\ %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: full
|
||||
type: horizontal-stack
|
||||
- heading: Last/Current Print Job
|
||||
heading_style: title
|
||||
icon: mdi:printer-3d
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_used_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:plus-minus
|
||||
name: Used Material Total
|
||||
type: tile
|
||||
- entity: sensor.sparkx_moonraker_print_eta
|
||||
features_position: bottom
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
name: Print ETA
|
||||
type: tile
|
||||
vertical: false
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in\
|
||||
\ ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n\
|
||||
{% endif %}"
|
||||
icon_color: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if\
|
||||
\ st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif\
|
||||
\ %}"
|
||||
multiline_secondary: true
|
||||
primary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w\
|
||||
\ = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in\
|
||||
\ ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1)\
|
||||
\ }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight')\
|
||||
\ | float(0) | round(1) }} g\n{% endif %}\n"
|
||||
secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set\
|
||||
\ c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing',\
|
||||
\ 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){%\
|
||||
\ else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost')\
|
||||
\ | float(0) | round(2) }} $ (last job)\n{% endif %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
- entity: sensor.sparkx_i7_expected_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: mdi:scale-balance
|
||||
icon_color: '{% set gcm = states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.0298) %}
|
||||
|
||||
{% set lencm = states(''sensor.sparkx_i7_expected_material_length'') | float(0)
|
||||
%}
|
||||
|
||||
{% set wgt = states(''sensor.sparkx_i7_expected_material_weight'') | float(0)
|
||||
%}
|
||||
|
||||
{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}
|
||||
|
||||
{% set used_g = ((states(''sensor.sparkx_i7_used_material_length'') | float(0))
|
||||
* gcm) | round(1) %}
|
||||
|
||||
{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}
|
||||
|
||||
{% set gc = namespace(list=[]) %}
|
||||
|
||||
{% for p in (state_attr(''sensor.sparkx_i7_expected_material_length'',''color'')
|
||||
| default('''', true) | string).split('';'') %}
|
||||
|
||||
{% set q = p | replace(''#'','''') | lower | trim %}
|
||||
|
||||
{% if q not in ['''',''none'',''unknown'',''unavailable''] %}{% set gc.list
|
||||
= gc.list + [q] %}{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set single = (gc.list | length) == 1 %}
|
||||
|
||||
{% set aslot = (states(''sensor.sparkx_i7_active_filament_slot'') | default('''',
|
||||
true) | string).split(''_'')[-1] %}
|
||||
|
||||
{% set aslot = aslot if aslot in [''1'',''2'',''3'',''4''] else '''' %}
|
||||
|
||||
{% set s = namespace(short=false, ok=false, matched=0, active=false) %}
|
||||
|
||||
{% for n in [''1'',''2'',''3'',''4''] %}
|
||||
|
||||
{% set sp = namespace(id='''', rem=-1) %}
|
||||
|
||||
{% for e in integration_entities(''spoolman'') if e.endswith(''_color_hex'')
|
||||
%}
|
||||
|
||||
{% if sp.id == '''' and (state_attr(e[:-10],''location'') | default('''',
|
||||
true) | lower) == (''cfs lite '' ~ n) %}
|
||||
|
||||
{% set sp.id = e[:-10] %}
|
||||
|
||||
{% set sp.rem = states(e[:-10]) | float(-1) %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if sp.id != '''' and sp.rem >= 0 %}
|
||||
|
||||
{% set s.matched = s.matched + 1 %}
|
||||
|
||||
{% if single %}
|
||||
|
||||
{% if n == aslot %}
|
||||
|
||||
{% set s.active = true %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set active = (states(''sensor.sparkx_i7_print_status'') | default('''',
|
||||
true)) in [''printing'',''paused''] %}
|
||||
|
||||
{% set v = namespace(state=''unknown'', label=''check unavailable'') %}
|
||||
|
||||
{% if not active %}
|
||||
|
||||
{% set v.state = ''idle'' %}
|
||||
|
||||
{% set v.label = ''no active print'' %}
|
||||
|
||||
{% elif job_g <= 0 %}
|
||||
|
||||
{% set v.state = ''none'' %}
|
||||
|
||||
{% set v.label = ''no slicer estimate yet'' %}
|
||||
|
||||
{% elif s.short %}
|
||||
|
||||
{% set v.state = ''short'' %}
|
||||
|
||||
{% set v.label = ''NOT ENOUGH'' %}
|
||||
|
||||
{% elif s.ok %}
|
||||
|
||||
{% set v.state = ''ok'' %}
|
||||
|
||||
{% set v.label = ''enough'' %}
|
||||
|
||||
{% elif single and aslot == '''' %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no active CFS slot'' %}
|
||||
|
||||
{% elif single and not s.active %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''active slot has no spool'' %}
|
||||
|
||||
{% elif s.matched == 0 %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no spool loaded'' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if v.state == ''ok'' %}green{% elif v.state == ''short'' %}red{% elif
|
||||
v.state in [''none'',''idle''] %}grey{% else %}orange{% endif %}'
|
||||
multiline_secondary: true
|
||||
name: Filament Sufficiency
|
||||
primary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298)\
|
||||
\ %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}no active print{% else %}{{ job_g }} g needed \xB7 {{ used_g }} g used{%\
|
||||
\ endif %}"
|
||||
secondary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') |\
|
||||
\ float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}last job: {{ job_g }} g needed{% else %}{{ rem_g }} g left to print\
|
||||
\ \xB7 {{ v.label }}{% endif %}"
|
||||
type: custom:mushroom-template-card
|
||||
- heading: Temperature
|
||||
heading_style: title
|
||||
icon: mdi:coolant-temperature
|
||||
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: sensor.sparkx_i7_real_time_flow
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 40
|
||||
min: 0
|
||||
name: Flow
|
||||
severity:
|
||||
green: 0
|
||||
red: 24
|
||||
yellow: 12
|
||||
type: gauge
|
||||
type: grid
|
||||
type: sections
|
||||
@@ -0,0 +1,497 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: 3d-printer-cellphone
|
||||
captured: '2026-10-16T20:16:07.146764+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- sections:
|
||||
- cards:
|
||||
- card:
|
||||
columns: 4
|
||||
square: false
|
||||
type: grid
|
||||
card_param: cards
|
||||
filter:
|
||||
template: "{% set ns = namespace(cards=[]) %}{% set active_n = (states('sensor.sparkx_i7_active_filament_slot').split('_')[-1]\
|
||||
\ | int(0)) if states('sensor.sparkx_i7_print_status') in ['printing',\
|
||||
\ 'paused'] else 0 %}\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 '') %}{% set v.wrap = v.wrap ~ ' active' if (n == active_n)\
|
||||
\ else v.wrap %}\n {% set v.border = '#d0d0d0' if hex_clean | lower\
|
||||
\ in ['#ffffff', '#fff'] else 'transparent' %}\n {% set v.html = \"\
|
||||
<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 {% set v.label = 'Slot ' ~ n ~\
|
||||
\ (' \u26A0' if band > 0 else '') %}\n {% else %}\n {% set v.html\
|
||||
\ = \"<div class='tube-bg tube-empty'></div>\" %}\n {% set v.label\
|
||||
\ = \"<span class='slot-warn'>Slot \" ~ n ~ \" \u2014 empty</span>\" %}\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\": \"<div class='tube-wrap\"\
|
||||
\ ~ v.wrap ~ \"'>\" ~ v.html ~ \"<div class='slot-label'>\" ~ v.label\
|
||||
\ ~ \"</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 {\"flex-direction\"\
|
||||
: \"column\"},\n {\"align-items\": \"center\"}\n ]\n \
|
||||
\ }\n },\n \"extra_styles\": \"\n .tube-wrap.active .tube-bg\
|
||||
\ { box-shadow: 0 0 10px 2px var(--primary-color); } .tube-wrap.active\
|
||||
\ .slot-label { color: var(--primary-color); font-weight: 800; } \
|
||||
\ .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
|
||||
- type: horizontal-stack
|
||||
grid_options:
|
||||
columns: full
|
||||
cards:
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_1_color
|
||||
name: ''
|
||||
icon: mdi:weight-gram
|
||||
multiline_secondary: false
|
||||
primary: '{% 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) %}{{ live | round(1) }} g{% else %}{{ (states(''input_number.sparkx_i7_slot_1_grams'')
|
||||
| float(0)) | round(1) }} g{% endif %}'
|
||||
secondary: ''
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_2_color
|
||||
name: ''
|
||||
icon: mdi:weight-gram
|
||||
multiline_secondary: false
|
||||
primary: '{% 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) %}{{ live | round(1) }} g{% else %}{{ (states(''input_number.sparkx_i7_slot_2_grams'')
|
||||
| float(0)) | round(1) }} g{% endif %}'
|
||||
secondary: ''
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_3_color
|
||||
name: ''
|
||||
icon: mdi:weight-gram
|
||||
multiline_secondary: false
|
||||
primary: '{% 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) %}{{ live | round(1) }} g{% else %}{{ (states(''input_number.sparkx_i7_slot_3_grams'')
|
||||
| float(0)) | round(1) }} g{% endif %}'
|
||||
secondary: ''
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_4_color
|
||||
name: ''
|
||||
icon: mdi:weight-gram
|
||||
multiline_secondary: false
|
||||
primary: '{% 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) %}{{ live | round(1) }} g{% else %}{{ (states(''input_number.sparkx_i7_slot_4_grams'')
|
||||
| float(0)) | round(1) }} g{% endif %}'
|
||||
secondary: ''
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:water-percent
|
||||
name: Humidity
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:thermometer
|
||||
name: Temperature
|
||||
type: tile
|
||||
- cards:
|
||||
- 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')\
|
||||
\ %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_'\
|
||||
\ ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce)\
|
||||
\ | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1)\
|
||||
\ %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex')\
|
||||
\ and (state_attr(e[:-10], 'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10]\
|
||||
\ ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif\
|
||||
\ %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No\
|
||||
\ slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{\
|
||||
\ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} \u2192 spool {{\
|
||||
\ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id\
|
||||
\ ~ '_filament_name') }} \xB7 {{ ns.rem | round(1) }} g left)\n{% endif\
|
||||
\ %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: full
|
||||
type: horizontal-stack
|
||||
- heading: Last/Current Print Job
|
||||
heading_style: title
|
||||
icon: mdi:printer-3d
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_used_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:plus-minus
|
||||
name: Used Material Total
|
||||
type: tile
|
||||
- entity: sensor.sparkx_moonraker_print_eta
|
||||
features_position: bottom
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
name: Print ETA
|
||||
type: tile
|
||||
vertical: false
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in\
|
||||
\ ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n\
|
||||
{% endif %}"
|
||||
icon_color: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if\
|
||||
\ st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif\
|
||||
\ %}"
|
||||
multiline_secondary: true
|
||||
primary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w\
|
||||
\ = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in\
|
||||
\ ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1)\
|
||||
\ }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight')\
|
||||
\ | float(0) | round(1) }} g\n{% endif %}\n"
|
||||
secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set\
|
||||
\ c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing',\
|
||||
\ 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){%\
|
||||
\ else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost')\
|
||||
\ | float(0) | round(2) }} $ (last job)\n{% endif %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
- entity: sensor.sparkx_i7_expected_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: mdi:scale-balance
|
||||
icon_color: '{% set gcm = states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.0298) %}
|
||||
|
||||
{% set lencm = states(''sensor.sparkx_i7_expected_material_length'') | float(0)
|
||||
%}
|
||||
|
||||
{% set wgt = states(''sensor.sparkx_i7_expected_material_weight'') | float(0)
|
||||
%}
|
||||
|
||||
{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}
|
||||
|
||||
{% set used_g = ((states(''sensor.sparkx_i7_used_material_length'') | float(0))
|
||||
* gcm) | round(1) %}
|
||||
|
||||
{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}
|
||||
|
||||
{% set gc = namespace(list=[]) %}
|
||||
|
||||
{% for p in (state_attr(''sensor.sparkx_i7_expected_material_length'',''color'')
|
||||
| default('''', true) | string).split('';'') %}
|
||||
|
||||
{% set q = p | replace(''#'','''') | lower | trim %}
|
||||
|
||||
{% if q not in ['''',''none'',''unknown'',''unavailable''] %}{% set gc.list
|
||||
= gc.list + [q] %}{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set single = (gc.list | length) == 1 %}
|
||||
|
||||
{% set aslot = (states(''sensor.sparkx_i7_active_filament_slot'') | default('''',
|
||||
true) | string).split(''_'')[-1] %}
|
||||
|
||||
{% set aslot = aslot if aslot in [''1'',''2'',''3'',''4''] else '''' %}
|
||||
|
||||
{% set s = namespace(short=false, ok=false, matched=0, active=false) %}
|
||||
|
||||
{% for n in [''1'',''2'',''3'',''4''] %}
|
||||
|
||||
{% set sp = namespace(id='''', rem=-1) %}
|
||||
|
||||
{% for e in integration_entities(''spoolman'') if e.endswith(''_color_hex'')
|
||||
%}
|
||||
|
||||
{% if sp.id == '''' and (state_attr(e[:-10],''location'') | default('''',
|
||||
true) | lower) == (''cfs lite '' ~ n) %}
|
||||
|
||||
{% set sp.id = e[:-10] %}
|
||||
|
||||
{% set sp.rem = states(e[:-10]) | float(-1) %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if sp.id != '''' and sp.rem >= 0 %}
|
||||
|
||||
{% set s.matched = s.matched + 1 %}
|
||||
|
||||
{% if single %}
|
||||
|
||||
{% if n == aslot %}
|
||||
|
||||
{% set s.active = true %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set active = (states(''sensor.sparkx_i7_print_status'') | default('''',
|
||||
true)) in [''printing'',''paused''] %}
|
||||
|
||||
{% set v = namespace(state=''unknown'', label=''check unavailable'') %}
|
||||
|
||||
{% if not active %}
|
||||
|
||||
{% set v.state = ''idle'' %}
|
||||
|
||||
{% set v.label = ''no active print'' %}
|
||||
|
||||
{% elif job_g <= 0 %}
|
||||
|
||||
{% set v.state = ''none'' %}
|
||||
|
||||
{% set v.label = ''no slicer estimate yet'' %}
|
||||
|
||||
{% elif s.short %}
|
||||
|
||||
{% set v.state = ''short'' %}
|
||||
|
||||
{% set v.label = ''NOT ENOUGH'' %}
|
||||
|
||||
{% elif s.ok %}
|
||||
|
||||
{% set v.state = ''ok'' %}
|
||||
|
||||
{% set v.label = ''enough'' %}
|
||||
|
||||
{% elif single and aslot == '''' %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no active CFS slot'' %}
|
||||
|
||||
{% elif single and not s.active %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''active slot has no spool'' %}
|
||||
|
||||
{% elif s.matched == 0 %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no spool loaded'' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if v.state == ''ok'' %}green{% elif v.state == ''short'' %}red{% elif
|
||||
v.state in [''none'',''idle''] %}grey{% else %}orange{% endif %}'
|
||||
multiline_secondary: true
|
||||
name: Filament Sufficiency
|
||||
primary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298)\
|
||||
\ %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}no active print{% else %}{{ job_g }} g needed \xB7 {{ used_g }} g used{%\
|
||||
\ endif %}"
|
||||
secondary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') |\
|
||||
\ float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}last job: {{ job_g }} g needed{% else %}{{ rem_g }} g left to print\
|
||||
\ \xB7 {{ v.label }}{% endif %}"
|
||||
type: custom:mushroom-template-card
|
||||
- heading: Temperature
|
||||
heading_style: title
|
||||
icon: mdi:coolant-temperature
|
||||
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: sensor.sparkx_i7_real_time_flow
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 40
|
||||
min: 0
|
||||
name: Flow
|
||||
severity:
|
||||
green: 0
|
||||
red: 24
|
||||
yellow: 12
|
||||
type: gauge
|
||||
type: grid
|
||||
type: sections
|
||||
@@ -0,0 +1,497 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: 3d-printer-cellphone
|
||||
captured: '2026-10-16T20:17:46.982906+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- sections:
|
||||
- cards:
|
||||
- card:
|
||||
columns: 4
|
||||
square: false
|
||||
type: grid
|
||||
card_param: cards
|
||||
filter:
|
||||
template: "{% set ns = namespace(cards=[]) %}{% set active_n = (states('sensor.sparkx_i7_active_filament_slot').split('_')[-1]\
|
||||
\ | int(0)) if states('sensor.sparkx_i7_print_status') in ['printing',\
|
||||
\ 'paused'] else 0 %}\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 '') %}{% set v.wrap = v.wrap ~ ' active' if (n == active_n)\
|
||||
\ else v.wrap %}\n {% set v.border = '#d0d0d0' if hex_clean | lower\
|
||||
\ in ['#ffffff', '#fff'] else 'transparent' %}\n {% set v.html = \"\
|
||||
<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 {% set v.label = 'Slot ' ~ n ~\
|
||||
\ (' \u26A0' if band > 0 else '') %}\n {% else %}\n {% set v.html\
|
||||
\ = \"<div class='tube-bg tube-empty'></div>\" %}\n {% set v.label\
|
||||
\ = \"<span class='slot-warn'>Slot \" ~ n ~ \" \u2014 empty</span>\" %}\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\": \"<div class='tube-wrap\"\
|
||||
\ ~ v.wrap ~ \"'>\" ~ v.html ~ \"<div class='slot-label'>\" ~ v.label\
|
||||
\ ~ \"</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 {\"flex-direction\"\
|
||||
: \"column\"},\n {\"align-items\": \"center\"}\n ]\n \
|
||||
\ }\n },\n \"extra_styles\": \"\n .tube-wrap.active .tube-bg\
|
||||
\ { box-shadow: 0 0 10px 2px var(--primary-color); } .tube-wrap.active\
|
||||
\ .slot-label { color: var(--primary-color); font-weight: 800; } \
|
||||
\ .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
|
||||
- type: horizontal-stack
|
||||
grid_options:
|
||||
columns: full
|
||||
cards:
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_1_color
|
||||
name: ''
|
||||
icon: none
|
||||
multiline_secondary: false
|
||||
primary: '{% 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) %}{{ live | round(1) }} g{% else %}{{ (states(''input_number.sparkx_i7_slot_1_grams'')
|
||||
| float(0)) | round(1) }} g{% endif %}'
|
||||
secondary: ''
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_2_color
|
||||
name: ''
|
||||
icon: none
|
||||
multiline_secondary: false
|
||||
primary: '{% 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) %}{{ live | round(1) }} g{% else %}{{ (states(''input_number.sparkx_i7_slot_2_grams'')
|
||||
| float(0)) | round(1) }} g{% endif %}'
|
||||
secondary: ''
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_3_color
|
||||
name: ''
|
||||
icon: none
|
||||
multiline_secondary: false
|
||||
primary: '{% 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) %}{{ live | round(1) }} g{% else %}{{ (states(''input_number.sparkx_i7_slot_3_grams'')
|
||||
| float(0)) | round(1) }} g{% endif %}'
|
||||
secondary: ''
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_4_color
|
||||
name: ''
|
||||
icon: none
|
||||
multiline_secondary: false
|
||||
primary: '{% 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) %}{{ live | round(1) }} g{% else %}{{ (states(''input_number.sparkx_i7_slot_4_grams'')
|
||||
| float(0)) | round(1) }} g{% endif %}'
|
||||
secondary: ''
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:water-percent
|
||||
name: Humidity
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:thermometer
|
||||
name: Temperature
|
||||
type: tile
|
||||
- cards:
|
||||
- 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')\
|
||||
\ %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_'\
|
||||
\ ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce)\
|
||||
\ | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1)\
|
||||
\ %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex')\
|
||||
\ and (state_attr(e[:-10], 'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10]\
|
||||
\ ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif\
|
||||
\ %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No\
|
||||
\ slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{\
|
||||
\ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} \u2192 spool {{\
|
||||
\ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id\
|
||||
\ ~ '_filament_name') }} \xB7 {{ ns.rem | round(1) }} g left)\n{% endif\
|
||||
\ %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: full
|
||||
type: horizontal-stack
|
||||
- heading: Last/Current Print Job
|
||||
heading_style: title
|
||||
icon: mdi:printer-3d
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_used_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:plus-minus
|
||||
name: Used Material Total
|
||||
type: tile
|
||||
- entity: sensor.sparkx_moonraker_print_eta
|
||||
features_position: bottom
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
name: Print ETA
|
||||
type: tile
|
||||
vertical: false
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in\
|
||||
\ ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n\
|
||||
{% endif %}"
|
||||
icon_color: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if\
|
||||
\ st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif\
|
||||
\ %}"
|
||||
multiline_secondary: true
|
||||
primary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w\
|
||||
\ = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in\
|
||||
\ ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1)\
|
||||
\ }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight')\
|
||||
\ | float(0) | round(1) }} g\n{% endif %}\n"
|
||||
secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set\
|
||||
\ c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing',\
|
||||
\ 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){%\
|
||||
\ else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost')\
|
||||
\ | float(0) | round(2) }} $ (last job)\n{% endif %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
- entity: sensor.sparkx_i7_expected_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: mdi:scale-balance
|
||||
icon_color: '{% set gcm = states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.0298) %}
|
||||
|
||||
{% set lencm = states(''sensor.sparkx_i7_expected_material_length'') | float(0)
|
||||
%}
|
||||
|
||||
{% set wgt = states(''sensor.sparkx_i7_expected_material_weight'') | float(0)
|
||||
%}
|
||||
|
||||
{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}
|
||||
|
||||
{% set used_g = ((states(''sensor.sparkx_i7_used_material_length'') | float(0))
|
||||
* gcm) | round(1) %}
|
||||
|
||||
{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}
|
||||
|
||||
{% set gc = namespace(list=[]) %}
|
||||
|
||||
{% for p in (state_attr(''sensor.sparkx_i7_expected_material_length'',''color'')
|
||||
| default('''', true) | string).split('';'') %}
|
||||
|
||||
{% set q = p | replace(''#'','''') | lower | trim %}
|
||||
|
||||
{% if q not in ['''',''none'',''unknown'',''unavailable''] %}{% set gc.list
|
||||
= gc.list + [q] %}{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set single = (gc.list | length) == 1 %}
|
||||
|
||||
{% set aslot = (states(''sensor.sparkx_i7_active_filament_slot'') | default('''',
|
||||
true) | string).split(''_'')[-1] %}
|
||||
|
||||
{% set aslot = aslot if aslot in [''1'',''2'',''3'',''4''] else '''' %}
|
||||
|
||||
{% set s = namespace(short=false, ok=false, matched=0, active=false) %}
|
||||
|
||||
{% for n in [''1'',''2'',''3'',''4''] %}
|
||||
|
||||
{% set sp = namespace(id='''', rem=-1) %}
|
||||
|
||||
{% for e in integration_entities(''spoolman'') if e.endswith(''_color_hex'')
|
||||
%}
|
||||
|
||||
{% if sp.id == '''' and (state_attr(e[:-10],''location'') | default('''',
|
||||
true) | lower) == (''cfs lite '' ~ n) %}
|
||||
|
||||
{% set sp.id = e[:-10] %}
|
||||
|
||||
{% set sp.rem = states(e[:-10]) | float(-1) %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if sp.id != '''' and sp.rem >= 0 %}
|
||||
|
||||
{% set s.matched = s.matched + 1 %}
|
||||
|
||||
{% if single %}
|
||||
|
||||
{% if n == aslot %}
|
||||
|
||||
{% set s.active = true %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set active = (states(''sensor.sparkx_i7_print_status'') | default('''',
|
||||
true)) in [''printing'',''paused''] %}
|
||||
|
||||
{% set v = namespace(state=''unknown'', label=''check unavailable'') %}
|
||||
|
||||
{% if not active %}
|
||||
|
||||
{% set v.state = ''idle'' %}
|
||||
|
||||
{% set v.label = ''no active print'' %}
|
||||
|
||||
{% elif job_g <= 0 %}
|
||||
|
||||
{% set v.state = ''none'' %}
|
||||
|
||||
{% set v.label = ''no slicer estimate yet'' %}
|
||||
|
||||
{% elif s.short %}
|
||||
|
||||
{% set v.state = ''short'' %}
|
||||
|
||||
{% set v.label = ''NOT ENOUGH'' %}
|
||||
|
||||
{% elif s.ok %}
|
||||
|
||||
{% set v.state = ''ok'' %}
|
||||
|
||||
{% set v.label = ''enough'' %}
|
||||
|
||||
{% elif single and aslot == '''' %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no active CFS slot'' %}
|
||||
|
||||
{% elif single and not s.active %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''active slot has no spool'' %}
|
||||
|
||||
{% elif s.matched == 0 %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no spool loaded'' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if v.state == ''ok'' %}green{% elif v.state == ''short'' %}red{% elif
|
||||
v.state in [''none'',''idle''] %}grey{% else %}orange{% endif %}'
|
||||
multiline_secondary: true
|
||||
name: Filament Sufficiency
|
||||
primary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298)\
|
||||
\ %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}no active print{% else %}{{ job_g }} g needed \xB7 {{ used_g }} g used{%\
|
||||
\ endif %}"
|
||||
secondary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') |\
|
||||
\ float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}last job: {{ job_g }} g needed{% else %}{{ rem_g }} g left to print\
|
||||
\ \xB7 {{ v.label }}{% endif %}"
|
||||
type: custom:mushroom-template-card
|
||||
- heading: Temperature
|
||||
heading_style: title
|
||||
icon: mdi:coolant-temperature
|
||||
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: sensor.sparkx_i7_real_time_flow
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 40
|
||||
min: 0
|
||||
name: Flow
|
||||
severity:
|
||||
green: 0
|
||||
red: 24
|
||||
yellow: 12
|
||||
type: gauge
|
||||
type: grid
|
||||
type: sections
|
||||
@@ -0,0 +1,501 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: 3d-printer-cellphone
|
||||
captured: '2026-10-16T20:21:43.818350+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- sections:
|
||||
- cards:
|
||||
- card:
|
||||
columns: 4
|
||||
square: false
|
||||
type: grid
|
||||
card_param: cards
|
||||
filter:
|
||||
template: "{% set ns = namespace(cards=[]) %}{% set active_n = (states('sensor.sparkx_i7_active_filament_slot').split('_')[-1]\
|
||||
\ | int(0)) if states('sensor.sparkx_i7_print_status') in ['printing',\
|
||||
\ 'paused'] else 0 %}\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 '') %}{% set v.wrap = v.wrap ~ ' active' if (n == active_n)\
|
||||
\ else v.wrap %}\n {% set v.border = '#d0d0d0' if hex_clean | lower\
|
||||
\ in ['#ffffff', '#fff'] else 'transparent' %}\n {% set v.html = \"\
|
||||
<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 {% set v.label = 'Slot ' ~ n ~\
|
||||
\ (' \u26A0' if band > 0 else '') %}\n {% else %}\n {% set v.html\
|
||||
\ = \"<div class='tube-bg tube-empty'></div>\" %}\n {% set v.label\
|
||||
\ = \"<span class='slot-warn'>Slot \" ~ n ~ \" \u2014 empty</span>\" %}\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\": \"<div class='tube-wrap\"\
|
||||
\ ~ v.wrap ~ \"'>\" ~ v.html ~ \"<div class='slot-label'>\" ~ v.label\
|
||||
\ ~ \"</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 {\"flex-direction\"\
|
||||
: \"column\"},\n {\"align-items\": \"center\"}\n ]\n \
|
||||
\ }\n },\n \"extra_styles\": \"\n .tube-wrap.active .tube-bg\
|
||||
\ { box-shadow: 0 0 10px 2px var(--primary-color); } .tube-wrap.active\
|
||||
\ .slot-label { color: var(--primary-color); font-weight: 800; } \
|
||||
\ .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
|
||||
- type: horizontal-stack
|
||||
grid_options:
|
||||
columns: full
|
||||
cards:
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_1_color
|
||||
name: ''
|
||||
icon: none
|
||||
primary: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_1_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
secondary: ''
|
||||
card_mod:
|
||||
style: 'ha-card { text-align: left; font-size: 11px; padding: 2px; }'
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_2_color
|
||||
name: ''
|
||||
icon: none
|
||||
primary: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_2_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
secondary: ''
|
||||
card_mod:
|
||||
style: 'ha-card { text-align: left; font-size: 11px; padding: 2px; }'
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_3_color
|
||||
name: ''
|
||||
icon: none
|
||||
primary: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_3_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
secondary: ''
|
||||
card_mod:
|
||||
style: 'ha-card { text-align: left; font-size: 11px; padding: 2px; }'
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_4_color
|
||||
name: ''
|
||||
icon: none
|
||||
primary: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_4_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
secondary: ''
|
||||
card_mod:
|
||||
style: 'ha-card { text-align: left; font-size: 11px; padding: 2px; }'
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:water-percent
|
||||
name: Humidity
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:thermometer
|
||||
name: Temperature
|
||||
type: tile
|
||||
- cards:
|
||||
- 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')\
|
||||
\ %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_'\
|
||||
\ ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce)\
|
||||
\ | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1)\
|
||||
\ %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex')\
|
||||
\ and (state_attr(e[:-10], 'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10]\
|
||||
\ ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif\
|
||||
\ %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No\
|
||||
\ slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{\
|
||||
\ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} \u2192 spool {{\
|
||||
\ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id\
|
||||
\ ~ '_filament_name') }} \xB7 {{ ns.rem | round(1) }} g left)\n{% endif\
|
||||
\ %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: full
|
||||
type: horizontal-stack
|
||||
- heading: Last/Current Print Job
|
||||
heading_style: title
|
||||
icon: mdi:printer-3d
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_used_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:plus-minus
|
||||
name: Used Material Total
|
||||
type: tile
|
||||
- entity: sensor.sparkx_moonraker_print_eta
|
||||
features_position: bottom
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
name: Print ETA
|
||||
type: tile
|
||||
vertical: false
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in\
|
||||
\ ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n\
|
||||
{% endif %}"
|
||||
icon_color: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if\
|
||||
\ st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif\
|
||||
\ %}"
|
||||
multiline_secondary: true
|
||||
primary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w\
|
||||
\ = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in\
|
||||
\ ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1)\
|
||||
\ }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight')\
|
||||
\ | float(0) | round(1) }} g\n{% endif %}\n"
|
||||
secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set\
|
||||
\ c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing',\
|
||||
\ 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){%\
|
||||
\ else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost')\
|
||||
\ | float(0) | round(2) }} $ (last job)\n{% endif %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
- entity: sensor.sparkx_i7_expected_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: mdi:scale-balance
|
||||
icon_color: '{% set gcm = states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.0298) %}
|
||||
|
||||
{% set lencm = states(''sensor.sparkx_i7_expected_material_length'') | float(0)
|
||||
%}
|
||||
|
||||
{% set wgt = states(''sensor.sparkx_i7_expected_material_weight'') | float(0)
|
||||
%}
|
||||
|
||||
{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}
|
||||
|
||||
{% set used_g = ((states(''sensor.sparkx_i7_used_material_length'') | float(0))
|
||||
* gcm) | round(1) %}
|
||||
|
||||
{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}
|
||||
|
||||
{% set gc = namespace(list=[]) %}
|
||||
|
||||
{% for p in (state_attr(''sensor.sparkx_i7_expected_material_length'',''color'')
|
||||
| default('''', true) | string).split('';'') %}
|
||||
|
||||
{% set q = p | replace(''#'','''') | lower | trim %}
|
||||
|
||||
{% if q not in ['''',''none'',''unknown'',''unavailable''] %}{% set gc.list
|
||||
= gc.list + [q] %}{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set single = (gc.list | length) == 1 %}
|
||||
|
||||
{% set aslot = (states(''sensor.sparkx_i7_active_filament_slot'') | default('''',
|
||||
true) | string).split(''_'')[-1] %}
|
||||
|
||||
{% set aslot = aslot if aslot in [''1'',''2'',''3'',''4''] else '''' %}
|
||||
|
||||
{% set s = namespace(short=false, ok=false, matched=0, active=false) %}
|
||||
|
||||
{% for n in [''1'',''2'',''3'',''4''] %}
|
||||
|
||||
{% set sp = namespace(id='''', rem=-1) %}
|
||||
|
||||
{% for e in integration_entities(''spoolman'') if e.endswith(''_color_hex'')
|
||||
%}
|
||||
|
||||
{% if sp.id == '''' and (state_attr(e[:-10],''location'') | default('''',
|
||||
true) | lower) == (''cfs lite '' ~ n) %}
|
||||
|
||||
{% set sp.id = e[:-10] %}
|
||||
|
||||
{% set sp.rem = states(e[:-10]) | float(-1) %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if sp.id != '''' and sp.rem >= 0 %}
|
||||
|
||||
{% set s.matched = s.matched + 1 %}
|
||||
|
||||
{% if single %}
|
||||
|
||||
{% if n == aslot %}
|
||||
|
||||
{% set s.active = true %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set active = (states(''sensor.sparkx_i7_print_status'') | default('''',
|
||||
true)) in [''printing'',''paused''] %}
|
||||
|
||||
{% set v = namespace(state=''unknown'', label=''check unavailable'') %}
|
||||
|
||||
{% if not active %}
|
||||
|
||||
{% set v.state = ''idle'' %}
|
||||
|
||||
{% set v.label = ''no active print'' %}
|
||||
|
||||
{% elif job_g <= 0 %}
|
||||
|
||||
{% set v.state = ''none'' %}
|
||||
|
||||
{% set v.label = ''no slicer estimate yet'' %}
|
||||
|
||||
{% elif s.short %}
|
||||
|
||||
{% set v.state = ''short'' %}
|
||||
|
||||
{% set v.label = ''NOT ENOUGH'' %}
|
||||
|
||||
{% elif s.ok %}
|
||||
|
||||
{% set v.state = ''ok'' %}
|
||||
|
||||
{% set v.label = ''enough'' %}
|
||||
|
||||
{% elif single and aslot == '''' %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no active CFS slot'' %}
|
||||
|
||||
{% elif single and not s.active %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''active slot has no spool'' %}
|
||||
|
||||
{% elif s.matched == 0 %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no spool loaded'' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if v.state == ''ok'' %}green{% elif v.state == ''short'' %}red{% elif
|
||||
v.state in [''none'',''idle''] %}grey{% else %}orange{% endif %}'
|
||||
multiline_secondary: true
|
||||
name: Filament Sufficiency
|
||||
primary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298)\
|
||||
\ %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}no active print{% else %}{{ job_g }} g needed \xB7 {{ used_g }} g used{%\
|
||||
\ endif %}"
|
||||
secondary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') |\
|
||||
\ float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}last job: {{ job_g }} g needed{% else %}{{ rem_g }} g left to print\
|
||||
\ \xB7 {{ v.label }}{% endif %}"
|
||||
type: custom:mushroom-template-card
|
||||
- heading: Temperature
|
||||
heading_style: title
|
||||
icon: mdi:coolant-temperature
|
||||
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: sensor.sparkx_i7_real_time_flow
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 40
|
||||
min: 0
|
||||
name: Flow
|
||||
severity:
|
||||
green: 0
|
||||
red: 24
|
||||
yellow: 12
|
||||
type: gauge
|
||||
type: grid
|
||||
type: sections
|
||||
@@ -0,0 +1,505 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: 3d-printer-cellphone
|
||||
captured: '2026-10-16T20:29:47.993746+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- sections:
|
||||
- cards:
|
||||
- card:
|
||||
columns: 4
|
||||
square: false
|
||||
type: grid
|
||||
card_param: cards
|
||||
filter:
|
||||
template: "{% set ns = namespace(cards=[]) %}{% set active_n = (states('sensor.sparkx_i7_active_filament_slot').split('_')[-1]\
|
||||
\ | int(0)) if states('sensor.sparkx_i7_print_status') in ['printing',\
|
||||
\ 'paused'] else 0 %}\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 '') %}{% set v.wrap = v.wrap ~ ' active' if (n == active_n)\
|
||||
\ else v.wrap %}\n {% set v.border = '#d0d0d0' if hex_clean | lower\
|
||||
\ in ['#ffffff', '#fff'] else 'transparent' %}\n {% set v.html = \"\
|
||||
<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 {% set v.label = 'Slot ' ~ n ~\
|
||||
\ (' \u26A0' if band > 0 else '') %}\n {% else %}\n {% set v.html\
|
||||
\ = \"<div class='tube-bg tube-empty'></div>\" %}\n {% set v.label\
|
||||
\ = \"<span class='slot-warn'>Slot \" ~ n ~ \" \u2014 empty</span>\" %}\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\": \"<div class='tube-wrap\"\
|
||||
\ ~ v.wrap ~ \"'>\" ~ v.html ~ \"<div class='slot-label'>\" ~ v.label\
|
||||
\ ~ \"</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 {\"flex-direction\"\
|
||||
: \"column\"},\n {\"align-items\": \"center\"}\n ]\n \
|
||||
\ }\n },\n \"extra_styles\": \"\n .tube-wrap.active .tube-bg\
|
||||
\ { box-shadow: 0 0 10px 2px var(--primary-color); } .tube-wrap.active\
|
||||
\ .slot-label { color: var(--primary-color); font-weight: 800; } \
|
||||
\ .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
|
||||
- type: horizontal-stack
|
||||
grid_options:
|
||||
columns: full
|
||||
cards:
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_1_color
|
||||
name: ''
|
||||
icon: none
|
||||
primary: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_1_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
secondary: ''
|
||||
card_mod:
|
||||
style: 'ha-card { text-align: left; padding: 0 4px; font-size: 12px; line-height:
|
||||
1.2; } .mushroom-state { text-align: left; }'
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_2_color
|
||||
name: ''
|
||||
icon: none
|
||||
primary: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_2_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
secondary: ''
|
||||
card_mod:
|
||||
style: 'ha-card { text-align: left; padding: 0 4px; font-size: 12px; line-height:
|
||||
1.2; } .mushroom-state { text-align: left; }'
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_3_color
|
||||
name: ''
|
||||
icon: none
|
||||
primary: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_3_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
secondary: ''
|
||||
card_mod:
|
||||
style: 'ha-card { text-align: left; padding: 0 4px; font-size: 12px; line-height:
|
||||
1.2; } .mushroom-state { text-align: left; }'
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_4_color
|
||||
name: ''
|
||||
icon: none
|
||||
primary: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_4_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
secondary: ''
|
||||
card_mod:
|
||||
style: 'ha-card { text-align: left; padding: 0 4px; font-size: 12px; line-height:
|
||||
1.2; } .mushroom-state { text-align: left; }'
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:water-percent
|
||||
name: Humidity
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:thermometer
|
||||
name: Temperature
|
||||
type: tile
|
||||
- cards:
|
||||
- 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')\
|
||||
\ %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_'\
|
||||
\ ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce)\
|
||||
\ | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1)\
|
||||
\ %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex')\
|
||||
\ and (state_attr(e[:-10], 'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10]\
|
||||
\ ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif\
|
||||
\ %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No\
|
||||
\ slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{\
|
||||
\ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} \u2192 spool {{\
|
||||
\ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id\
|
||||
\ ~ '_filament_name') }} \xB7 {{ ns.rem | round(1) }} g left)\n{% endif\
|
||||
\ %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: full
|
||||
type: horizontal-stack
|
||||
- heading: Last/Current Print Job
|
||||
heading_style: title
|
||||
icon: mdi:printer-3d
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_used_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:plus-minus
|
||||
name: Used Material Total
|
||||
type: tile
|
||||
- entity: sensor.sparkx_moonraker_print_eta
|
||||
features_position: bottom
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
name: Print ETA
|
||||
type: tile
|
||||
vertical: false
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in\
|
||||
\ ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n\
|
||||
{% endif %}"
|
||||
icon_color: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if\
|
||||
\ st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif\
|
||||
\ %}"
|
||||
multiline_secondary: true
|
||||
primary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w\
|
||||
\ = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in\
|
||||
\ ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1)\
|
||||
\ }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight')\
|
||||
\ | float(0) | round(1) }} g\n{% endif %}\n"
|
||||
secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set\
|
||||
\ c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing',\
|
||||
\ 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){%\
|
||||
\ else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost')\
|
||||
\ | float(0) | round(2) }} $ (last job)\n{% endif %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
- entity: sensor.sparkx_i7_expected_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: mdi:scale-balance
|
||||
icon_color: '{% set gcm = states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.0298) %}
|
||||
|
||||
{% set lencm = states(''sensor.sparkx_i7_expected_material_length'') | float(0)
|
||||
%}
|
||||
|
||||
{% set wgt = states(''sensor.sparkx_i7_expected_material_weight'') | float(0)
|
||||
%}
|
||||
|
||||
{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}
|
||||
|
||||
{% set used_g = ((states(''sensor.sparkx_i7_used_material_length'') | float(0))
|
||||
* gcm) | round(1) %}
|
||||
|
||||
{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}
|
||||
|
||||
{% set gc = namespace(list=[]) %}
|
||||
|
||||
{% for p in (state_attr(''sensor.sparkx_i7_expected_material_length'',''color'')
|
||||
| default('''', true) | string).split('';'') %}
|
||||
|
||||
{% set q = p | replace(''#'','''') | lower | trim %}
|
||||
|
||||
{% if q not in ['''',''none'',''unknown'',''unavailable''] %}{% set gc.list
|
||||
= gc.list + [q] %}{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set single = (gc.list | length) == 1 %}
|
||||
|
||||
{% set aslot = (states(''sensor.sparkx_i7_active_filament_slot'') | default('''',
|
||||
true) | string).split(''_'')[-1] %}
|
||||
|
||||
{% set aslot = aslot if aslot in [''1'',''2'',''3'',''4''] else '''' %}
|
||||
|
||||
{% set s = namespace(short=false, ok=false, matched=0, active=false) %}
|
||||
|
||||
{% for n in [''1'',''2'',''3'',''4''] %}
|
||||
|
||||
{% set sp = namespace(id='''', rem=-1) %}
|
||||
|
||||
{% for e in integration_entities(''spoolman'') if e.endswith(''_color_hex'')
|
||||
%}
|
||||
|
||||
{% if sp.id == '''' and (state_attr(e[:-10],''location'') | default('''',
|
||||
true) | lower) == (''cfs lite '' ~ n) %}
|
||||
|
||||
{% set sp.id = e[:-10] %}
|
||||
|
||||
{% set sp.rem = states(e[:-10]) | float(-1) %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if sp.id != '''' and sp.rem >= 0 %}
|
||||
|
||||
{% set s.matched = s.matched + 1 %}
|
||||
|
||||
{% if single %}
|
||||
|
||||
{% if n == aslot %}
|
||||
|
||||
{% set s.active = true %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set active = (states(''sensor.sparkx_i7_print_status'') | default('''',
|
||||
true)) in [''printing'',''paused''] %}
|
||||
|
||||
{% set v = namespace(state=''unknown'', label=''check unavailable'') %}
|
||||
|
||||
{% if not active %}
|
||||
|
||||
{% set v.state = ''idle'' %}
|
||||
|
||||
{% set v.label = ''no active print'' %}
|
||||
|
||||
{% elif job_g <= 0 %}
|
||||
|
||||
{% set v.state = ''none'' %}
|
||||
|
||||
{% set v.label = ''no slicer estimate yet'' %}
|
||||
|
||||
{% elif s.short %}
|
||||
|
||||
{% set v.state = ''short'' %}
|
||||
|
||||
{% set v.label = ''NOT ENOUGH'' %}
|
||||
|
||||
{% elif s.ok %}
|
||||
|
||||
{% set v.state = ''ok'' %}
|
||||
|
||||
{% set v.label = ''enough'' %}
|
||||
|
||||
{% elif single and aslot == '''' %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no active CFS slot'' %}
|
||||
|
||||
{% elif single and not s.active %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''active slot has no spool'' %}
|
||||
|
||||
{% elif s.matched == 0 %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no spool loaded'' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if v.state == ''ok'' %}green{% elif v.state == ''short'' %}red{% elif
|
||||
v.state in [''none'',''idle''] %}grey{% else %}orange{% endif %}'
|
||||
multiline_secondary: true
|
||||
name: Filament Sufficiency
|
||||
primary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298)\
|
||||
\ %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}no active print{% else %}{{ job_g }} g needed \xB7 {{ used_g }} g used{%\
|
||||
\ endif %}"
|
||||
secondary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') |\
|
||||
\ float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}last job: {{ job_g }} g needed{% else %}{{ rem_g }} g left to print\
|
||||
\ \xB7 {{ v.label }}{% endif %}"
|
||||
type: custom:mushroom-template-card
|
||||
- heading: Temperature
|
||||
heading_style: title
|
||||
icon: mdi:coolant-temperature
|
||||
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: sensor.sparkx_i7_real_time_flow
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 40
|
||||
min: 0
|
||||
name: Flow
|
||||
severity:
|
||||
green: 0
|
||||
red: 24
|
||||
yellow: 12
|
||||
type: gauge
|
||||
type: grid
|
||||
type: sections
|
||||
@@ -0,0 +1,581 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: 3d-printer-cellphone
|
||||
captured: '2026-10-16T20:30:24.143652+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- sections:
|
||||
- cards:
|
||||
- card:
|
||||
columns: 4
|
||||
square: false
|
||||
type: grid
|
||||
card_param: cards
|
||||
filter:
|
||||
template: "{% set ns = namespace(cards=[]) %}{% set active_n = (states('sensor.sparkx_i7_active_filament_slot').split('_')[-1]\
|
||||
\ | int(0)) if states('sensor.sparkx_i7_print_status') in ['printing',\
|
||||
\ 'paused'] else 0 %}\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 '') %}{% set v.wrap = v.wrap ~ ' active' if (n == active_n)\
|
||||
\ else v.wrap %}\n {% set v.border = '#d0d0d0' if hex_clean | lower\
|
||||
\ in ['#ffffff', '#fff'] else 'transparent' %}\n {% set v.html = \"\
|
||||
<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 {% set v.label = 'Slot ' ~ n ~\
|
||||
\ (' \u26A0' if band > 0 else '') %}\n {% else %}\n {% set v.html\
|
||||
\ = \"<div class='tube-bg tube-empty'></div>\" %}\n {% set v.label\
|
||||
\ = \"<span class='slot-warn'>Slot \" ~ n ~ \" \u2014 empty</span>\" %}\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\": \"<div class='tube-wrap\"\
|
||||
\ ~ v.wrap ~ \"'>\" ~ v.html ~ \"<div class='slot-label'>\" ~ v.label\
|
||||
\ ~ \"</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 {\"flex-direction\"\
|
||||
: \"column\"},\n {\"align-items\": \"center\"}\n ]\n \
|
||||
\ }\n },\n \"extra_styles\": \"\n .tube-wrap.active .tube-bg\
|
||||
\ { box-shadow: 0 0 10px 2px var(--primary-color); } .tube-wrap.active\
|
||||
\ .slot-label { color: var(--primary-color); font-weight: 800; } \
|
||||
\ .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
|
||||
- type: horizontal-stack
|
||||
grid_options:
|
||||
columns: full
|
||||
cards:
|
||||
- type: button-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_1_color
|
||||
name: ''
|
||||
show_icon: false
|
||||
show_state: false
|
||||
show_name: false
|
||||
custom_fields:
|
||||
value: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_1_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
styles:
|
||||
card:
|
||||
- background: transparent
|
||||
- box-shadow: none
|
||||
- border: none
|
||||
- padding: 0 2px
|
||||
- text-align: left
|
||||
- justify-content: flex-start
|
||||
- align-items: flex-start
|
||||
custom_fields:
|
||||
value:
|
||||
- text-align: left
|
||||
- font-size: 11px
|
||||
- line-height: '1.1'
|
||||
- padding: '0'
|
||||
- margin: '0'
|
||||
- justify-content: flex-start
|
||||
- display: flex
|
||||
tap_action:
|
||||
action: none
|
||||
- type: button-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_2_color
|
||||
name: ''
|
||||
show_icon: false
|
||||
show_state: false
|
||||
show_name: false
|
||||
custom_fields:
|
||||
value: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_2_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
styles:
|
||||
card:
|
||||
- background: transparent
|
||||
- box-shadow: none
|
||||
- border: none
|
||||
- padding: 0 2px
|
||||
- text-align: left
|
||||
- justify-content: flex-start
|
||||
- align-items: flex-start
|
||||
custom_fields:
|
||||
value:
|
||||
- text-align: left
|
||||
- font-size: 11px
|
||||
- line-height: '1.1'
|
||||
- padding: '0'
|
||||
- margin: '0'
|
||||
- justify-content: flex-start
|
||||
- display: flex
|
||||
tap_action:
|
||||
action: none
|
||||
- type: button-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_3_color
|
||||
name: ''
|
||||
show_icon: false
|
||||
show_state: false
|
||||
show_name: false
|
||||
custom_fields:
|
||||
value: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_3_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
styles:
|
||||
card:
|
||||
- background: transparent
|
||||
- box-shadow: none
|
||||
- border: none
|
||||
- padding: 0 2px
|
||||
- text-align: left
|
||||
- justify-content: flex-start
|
||||
- align-items: flex-start
|
||||
custom_fields:
|
||||
value:
|
||||
- text-align: left
|
||||
- font-size: 11px
|
||||
- line-height: '1.1'
|
||||
- padding: '0'
|
||||
- margin: '0'
|
||||
- justify-content: flex-start
|
||||
- display: flex
|
||||
tap_action:
|
||||
action: none
|
||||
- type: button-card
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_4_color
|
||||
name: ''
|
||||
show_icon: false
|
||||
show_state: false
|
||||
show_name: false
|
||||
custom_fields:
|
||||
value: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_4_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
styles:
|
||||
card:
|
||||
- background: transparent
|
||||
- box-shadow: none
|
||||
- border: none
|
||||
- padding: 0 2px
|
||||
- text-align: left
|
||||
- justify-content: flex-start
|
||||
- align-items: flex-start
|
||||
custom_fields:
|
||||
value:
|
||||
- text-align: left
|
||||
- font-size: 11px
|
||||
- line-height: '1.1'
|
||||
- padding: '0'
|
||||
- margin: '0'
|
||||
- justify-content: flex-start
|
||||
- display: flex
|
||||
tap_action:
|
||||
action: none
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:water-percent
|
||||
name: Humidity
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:thermometer
|
||||
name: Temperature
|
||||
type: tile
|
||||
- cards:
|
||||
- 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')\
|
||||
\ %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_'\
|
||||
\ ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce)\
|
||||
\ | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1)\
|
||||
\ %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex')\
|
||||
\ and (state_attr(e[:-10], 'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10]\
|
||||
\ ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif\
|
||||
\ %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No\
|
||||
\ slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{\
|
||||
\ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} \u2192 spool {{\
|
||||
\ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id\
|
||||
\ ~ '_filament_name') }} \xB7 {{ ns.rem | round(1) }} g left)\n{% endif\
|
||||
\ %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: full
|
||||
type: horizontal-stack
|
||||
- heading: Last/Current Print Job
|
||||
heading_style: title
|
||||
icon: mdi:printer-3d
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_used_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:plus-minus
|
||||
name: Used Material Total
|
||||
type: tile
|
||||
- entity: sensor.sparkx_moonraker_print_eta
|
||||
features_position: bottom
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
name: Print ETA
|
||||
type: tile
|
||||
vertical: false
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in\
|
||||
\ ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n\
|
||||
{% endif %}"
|
||||
icon_color: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if\
|
||||
\ st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif\
|
||||
\ %}"
|
||||
multiline_secondary: true
|
||||
primary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w\
|
||||
\ = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in\
|
||||
\ ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1)\
|
||||
\ }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight')\
|
||||
\ | float(0) | round(1) }} g\n{% endif %}\n"
|
||||
secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set\
|
||||
\ c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing',\
|
||||
\ 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){%\
|
||||
\ else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost')\
|
||||
\ | float(0) | round(2) }} $ (last job)\n{% endif %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
- entity: sensor.sparkx_i7_expected_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: mdi:scale-balance
|
||||
icon_color: '{% set gcm = states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.0298) %}
|
||||
|
||||
{% set lencm = states(''sensor.sparkx_i7_expected_material_length'') | float(0)
|
||||
%}
|
||||
|
||||
{% set wgt = states(''sensor.sparkx_i7_expected_material_weight'') | float(0)
|
||||
%}
|
||||
|
||||
{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}
|
||||
|
||||
{% set used_g = ((states(''sensor.sparkx_i7_used_material_length'') | float(0))
|
||||
* gcm) | round(1) %}
|
||||
|
||||
{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}
|
||||
|
||||
{% set gc = namespace(list=[]) %}
|
||||
|
||||
{% for p in (state_attr(''sensor.sparkx_i7_expected_material_length'',''color'')
|
||||
| default('''', true) | string).split('';'') %}
|
||||
|
||||
{% set q = p | replace(''#'','''') | lower | trim %}
|
||||
|
||||
{% if q not in ['''',''none'',''unknown'',''unavailable''] %}{% set gc.list
|
||||
= gc.list + [q] %}{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set single = (gc.list | length) == 1 %}
|
||||
|
||||
{% set aslot = (states(''sensor.sparkx_i7_active_filament_slot'') | default('''',
|
||||
true) | string).split(''_'')[-1] %}
|
||||
|
||||
{% set aslot = aslot if aslot in [''1'',''2'',''3'',''4''] else '''' %}
|
||||
|
||||
{% set s = namespace(short=false, ok=false, matched=0, active=false) %}
|
||||
|
||||
{% for n in [''1'',''2'',''3'',''4''] %}
|
||||
|
||||
{% set sp = namespace(id='''', rem=-1) %}
|
||||
|
||||
{% for e in integration_entities(''spoolman'') if e.endswith(''_color_hex'')
|
||||
%}
|
||||
|
||||
{% if sp.id == '''' and (state_attr(e[:-10],''location'') | default('''',
|
||||
true) | lower) == (''cfs lite '' ~ n) %}
|
||||
|
||||
{% set sp.id = e[:-10] %}
|
||||
|
||||
{% set sp.rem = states(e[:-10]) | float(-1) %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if sp.id != '''' and sp.rem >= 0 %}
|
||||
|
||||
{% set s.matched = s.matched + 1 %}
|
||||
|
||||
{% if single %}
|
||||
|
||||
{% if n == aslot %}
|
||||
|
||||
{% set s.active = true %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set active = (states(''sensor.sparkx_i7_print_status'') | default('''',
|
||||
true)) in [''printing'',''paused''] %}
|
||||
|
||||
{% set v = namespace(state=''unknown'', label=''check unavailable'') %}
|
||||
|
||||
{% if not active %}
|
||||
|
||||
{% set v.state = ''idle'' %}
|
||||
|
||||
{% set v.label = ''no active print'' %}
|
||||
|
||||
{% elif job_g <= 0 %}
|
||||
|
||||
{% set v.state = ''none'' %}
|
||||
|
||||
{% set v.label = ''no slicer estimate yet'' %}
|
||||
|
||||
{% elif s.short %}
|
||||
|
||||
{% set v.state = ''short'' %}
|
||||
|
||||
{% set v.label = ''NOT ENOUGH'' %}
|
||||
|
||||
{% elif s.ok %}
|
||||
|
||||
{% set v.state = ''ok'' %}
|
||||
|
||||
{% set v.label = ''enough'' %}
|
||||
|
||||
{% elif single and aslot == '''' %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no active CFS slot'' %}
|
||||
|
||||
{% elif single and not s.active %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''active slot has no spool'' %}
|
||||
|
||||
{% elif s.matched == 0 %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no spool loaded'' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if v.state == ''ok'' %}green{% elif v.state == ''short'' %}red{% elif
|
||||
v.state in [''none'',''idle''] %}grey{% else %}orange{% endif %}'
|
||||
multiline_secondary: true
|
||||
name: Filament Sufficiency
|
||||
primary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298)\
|
||||
\ %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}no active print{% else %}{{ job_g }} g needed \xB7 {{ used_g }} g used{%\
|
||||
\ endif %}"
|
||||
secondary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') |\
|
||||
\ float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}last job: {{ job_g }} g needed{% else %}{{ rem_g }} g left to print\
|
||||
\ \xB7 {{ v.label }}{% endif %}"
|
||||
type: custom:mushroom-template-card
|
||||
- heading: Temperature
|
||||
heading_style: title
|
||||
icon: mdi:coolant-temperature
|
||||
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: sensor.sparkx_i7_real_time_flow
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 40
|
||||
min: 0
|
||||
name: Flow
|
||||
severity:
|
||||
green: 0
|
||||
red: 24
|
||||
yellow: 12
|
||||
type: gauge
|
||||
type: grid
|
||||
type: sections
|
||||
@@ -0,0 +1,533 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: 3d-printer-cellphone
|
||||
captured: '2026-10-16T20:32:05.728987+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- sections:
|
||||
- cards:
|
||||
- card:
|
||||
columns: 4
|
||||
square: false
|
||||
type: grid
|
||||
card_param: cards
|
||||
filter:
|
||||
template: "{% set ns = namespace(cards=[]) %}{% set active_n = (states('sensor.sparkx_i7_active_filament_slot').split('_')[-1]\
|
||||
\ | int(0)) if states('sensor.sparkx_i7_print_status') in ['printing',\
|
||||
\ 'paused'] else 0 %}\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 '') %}{% set v.wrap = v.wrap ~ ' active' if (n == active_n)\
|
||||
\ else v.wrap %}\n {% set v.border = '#d0d0d0' if hex_clean | lower\
|
||||
\ in ['#ffffff', '#fff'] else 'transparent' %}\n {% set v.html = \"\
|
||||
<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 {% set v.label = 'Slot ' ~ n ~\
|
||||
\ (' \u26A0' if band > 0 else '') %}\n {% else %}\n {% set v.html\
|
||||
\ = \"<div class='tube-bg tube-empty'></div>\" %}\n {% set v.label\
|
||||
\ = \"<span class='slot-warn'>Slot \" ~ n ~ \" \u2014 empty</span>\" %}\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\": \"<div class='tube-wrap\"\
|
||||
\ ~ v.wrap ~ \"'>\" ~ v.html ~ \"<div class='slot-label'>\" ~ v.label\
|
||||
\ ~ \"</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 {\"flex-direction\"\
|
||||
: \"column\"},\n {\"align-items\": \"center\"}\n ]\n \
|
||||
\ }\n },\n \"extra_styles\": \"\n .tube-wrap.active .tube-bg\
|
||||
\ { box-shadow: 0 0 10px 2px var(--primary-color); } .tube-wrap.active\
|
||||
\ .slot-label { color: var(--primary-color); font-weight: 800; } \
|
||||
\ .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
|
||||
- type: horizontal-stack
|
||||
grid_options:
|
||||
columns: full
|
||||
cards:
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_1_color
|
||||
name: ''
|
||||
icon: none
|
||||
state_content:
|
||||
- state
|
||||
grid_options:
|
||||
columns: 3
|
||||
tap_action:
|
||||
action: none
|
||||
card_mod:
|
||||
style: 'ha-card { padding: 0 4px; margin: 0; } .tile { padding: 0; } .tile__title
|
||||
{ display: none; } .tile__state { text-align: left; justify-content:
|
||||
flex-start; font-size: 10px; line-height: 1; margin: 0; padding: 0;
|
||||
} .tile__icon { display: none; }'
|
||||
state_display: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_1_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_2_color
|
||||
name: ''
|
||||
icon: none
|
||||
state_content:
|
||||
- state
|
||||
grid_options:
|
||||
columns: 3
|
||||
tap_action:
|
||||
action: none
|
||||
card_mod:
|
||||
style: 'ha-card { padding: 0 4px; margin: 0; } .tile { padding: 0; } .tile__title
|
||||
{ display: none; } .tile__state { text-align: left; justify-content:
|
||||
flex-start; font-size: 10px; line-height: 1; margin: 0; padding: 0;
|
||||
} .tile__icon { display: none; }'
|
||||
state_display: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_2_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_3_color
|
||||
name: ''
|
||||
icon: none
|
||||
state_content:
|
||||
- state
|
||||
grid_options:
|
||||
columns: 3
|
||||
tap_action:
|
||||
action: none
|
||||
card_mod:
|
||||
style: 'ha-card { padding: 0 4px; margin: 0; } .tile { padding: 0; } .tile__title
|
||||
{ display: none; } .tile__state { text-align: left; justify-content:
|
||||
flex-start; font-size: 10px; line-height: 1; margin: 0; padding: 0;
|
||||
} .tile__icon { display: none; }'
|
||||
state_display: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_3_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_cfs_box_1_slot_4_color
|
||||
name: ''
|
||||
icon: none
|
||||
state_content:
|
||||
- state
|
||||
grid_options:
|
||||
columns: 3
|
||||
tap_action:
|
||||
action: none
|
||||
card_mod:
|
||||
style: 'ha-card { padding: 0 4px; margin: 0; } .tile { padding: 0; } .tile__title
|
||||
{ display: none; } .tile__state { text-align: left; justify-content:
|
||||
flex-start; font-size: 10px; line-height: 1; margin: 0; padding: 0;
|
||||
} .tile__icon { display: none; }'
|
||||
state_display: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_4_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:water-percent
|
||||
name: Humidity
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:thermometer
|
||||
name: Temperature
|
||||
type: tile
|
||||
- cards:
|
||||
- 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')\
|
||||
\ %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_'\
|
||||
\ ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce)\
|
||||
\ | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1)\
|
||||
\ %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex')\
|
||||
\ and (state_attr(e[:-10], 'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10]\
|
||||
\ ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif\
|
||||
\ %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No\
|
||||
\ slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{\
|
||||
\ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} \u2192 spool {{\
|
||||
\ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id\
|
||||
\ ~ '_filament_name') }} \xB7 {{ ns.rem | round(1) }} g left)\n{% endif\
|
||||
\ %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: full
|
||||
type: horizontal-stack
|
||||
- heading: Last/Current Print Job
|
||||
heading_style: title
|
||||
icon: mdi:printer-3d
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_used_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:plus-minus
|
||||
name: Used Material Total
|
||||
type: tile
|
||||
- entity: sensor.sparkx_moonraker_print_eta
|
||||
features_position: bottom
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
name: Print ETA
|
||||
type: tile
|
||||
vertical: false
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in\
|
||||
\ ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n\
|
||||
{% endif %}"
|
||||
icon_color: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if\
|
||||
\ st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif\
|
||||
\ %}"
|
||||
multiline_secondary: true
|
||||
primary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w\
|
||||
\ = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in\
|
||||
\ ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1)\
|
||||
\ }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight')\
|
||||
\ | float(0) | round(1) }} g\n{% endif %}\n"
|
||||
secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set\
|
||||
\ c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing',\
|
||||
\ 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){%\
|
||||
\ else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost')\
|
||||
\ | float(0) | round(2) }} $ (last job)\n{% endif %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
- entity: sensor.sparkx_i7_expected_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: mdi:scale-balance
|
||||
icon_color: '{% set gcm = states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.0298) %}
|
||||
|
||||
{% set lencm = states(''sensor.sparkx_i7_expected_material_length'') | float(0)
|
||||
%}
|
||||
|
||||
{% set wgt = states(''sensor.sparkx_i7_expected_material_weight'') | float(0)
|
||||
%}
|
||||
|
||||
{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}
|
||||
|
||||
{% set used_g = ((states(''sensor.sparkx_i7_used_material_length'') | float(0))
|
||||
* gcm) | round(1) %}
|
||||
|
||||
{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}
|
||||
|
||||
{% set gc = namespace(list=[]) %}
|
||||
|
||||
{% for p in (state_attr(''sensor.sparkx_i7_expected_material_length'',''color'')
|
||||
| default('''', true) | string).split('';'') %}
|
||||
|
||||
{% set q = p | replace(''#'','''') | lower | trim %}
|
||||
|
||||
{% if q not in ['''',''none'',''unknown'',''unavailable''] %}{% set gc.list
|
||||
= gc.list + [q] %}{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set single = (gc.list | length) == 1 %}
|
||||
|
||||
{% set aslot = (states(''sensor.sparkx_i7_active_filament_slot'') | default('''',
|
||||
true) | string).split(''_'')[-1] %}
|
||||
|
||||
{% set aslot = aslot if aslot in [''1'',''2'',''3'',''4''] else '''' %}
|
||||
|
||||
{% set s = namespace(short=false, ok=false, matched=0, active=false) %}
|
||||
|
||||
{% for n in [''1'',''2'',''3'',''4''] %}
|
||||
|
||||
{% set sp = namespace(id='''', rem=-1) %}
|
||||
|
||||
{% for e in integration_entities(''spoolman'') if e.endswith(''_color_hex'')
|
||||
%}
|
||||
|
||||
{% if sp.id == '''' and (state_attr(e[:-10],''location'') | default('''',
|
||||
true) | lower) == (''cfs lite '' ~ n) %}
|
||||
|
||||
{% set sp.id = e[:-10] %}
|
||||
|
||||
{% set sp.rem = states(e[:-10]) | float(-1) %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if sp.id != '''' and sp.rem >= 0 %}
|
||||
|
||||
{% set s.matched = s.matched + 1 %}
|
||||
|
||||
{% if single %}
|
||||
|
||||
{% if n == aslot %}
|
||||
|
||||
{% set s.active = true %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set active = (states(''sensor.sparkx_i7_print_status'') | default('''',
|
||||
true)) in [''printing'',''paused''] %}
|
||||
|
||||
{% set v = namespace(state=''unknown'', label=''check unavailable'') %}
|
||||
|
||||
{% if not active %}
|
||||
|
||||
{% set v.state = ''idle'' %}
|
||||
|
||||
{% set v.label = ''no active print'' %}
|
||||
|
||||
{% elif job_g <= 0 %}
|
||||
|
||||
{% set v.state = ''none'' %}
|
||||
|
||||
{% set v.label = ''no slicer estimate yet'' %}
|
||||
|
||||
{% elif s.short %}
|
||||
|
||||
{% set v.state = ''short'' %}
|
||||
|
||||
{% set v.label = ''NOT ENOUGH'' %}
|
||||
|
||||
{% elif s.ok %}
|
||||
|
||||
{% set v.state = ''ok'' %}
|
||||
|
||||
{% set v.label = ''enough'' %}
|
||||
|
||||
{% elif single and aslot == '''' %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no active CFS slot'' %}
|
||||
|
||||
{% elif single and not s.active %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''active slot has no spool'' %}
|
||||
|
||||
{% elif s.matched == 0 %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no spool loaded'' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if v.state == ''ok'' %}green{% elif v.state == ''short'' %}red{% elif
|
||||
v.state in [''none'',''idle''] %}grey{% else %}orange{% endif %}'
|
||||
multiline_secondary: true
|
||||
name: Filament Sufficiency
|
||||
primary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298)\
|
||||
\ %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}no active print{% else %}{{ job_g }} g needed \xB7 {{ used_g }} g used{%\
|
||||
\ endif %}"
|
||||
secondary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') |\
|
||||
\ float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}last job: {{ job_g }} g needed{% else %}{{ rem_g }} g left to print\
|
||||
\ \xB7 {{ v.label }}{% endif %}"
|
||||
type: custom:mushroom-template-card
|
||||
- heading: Temperature
|
||||
heading_style: title
|
||||
icon: mdi:coolant-temperature
|
||||
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: sensor.sparkx_i7_real_time_flow
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 40
|
||||
min: 0
|
||||
name: Flow
|
||||
severity:
|
||||
green: 0
|
||||
red: 24
|
||||
yellow: 12
|
||||
type: gauge
|
||||
type: grid
|
||||
type: sections
|
||||
@@ -0,0 +1,493 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: 3d-printer-cellphone
|
||||
captured: '2026-10-18T06:00:39.967779+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- sections:
|
||||
- cards:
|
||||
- card:
|
||||
columns: 4
|
||||
square: false
|
||||
type: grid
|
||||
card_param: cards
|
||||
filter:
|
||||
template: "{% set ns = namespace(cards=[]) %}{% set active_n = (states('sensor.sparkx_i7_active_filament_slot').split('_')[-1]\
|
||||
\ | int(0)) if states('sensor.sparkx_i7_print_status') in ['printing',\
|
||||
\ 'paused'] else 0 %}\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 '') %}{% set v.wrap = v.wrap ~ ' active' if (n == active_n)\
|
||||
\ else v.wrap %}\n {% set v.border = '#d0d0d0' if hex_clean | lower\
|
||||
\ in ['#ffffff', '#fff'] else 'transparent' %}\n {% set v.html = \"\
|
||||
<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 {% set v.label = 'Slot ' ~ n ~\
|
||||
\ (' \u26A0' if band > 0 else '') %}\n {% else %}\n {% set v.html\
|
||||
\ = \"<div class='tube-bg tube-empty'></div>\" %}\n {% set v.label\
|
||||
\ = \"<span class='slot-warn'>Slot \" ~ n ~ \" \u2014 empty</span>\" %}\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\": \"<div class='tube-wrap\"\
|
||||
\ ~ v.wrap ~ \"'>\" ~ v.html ~ \"<div class='slot-label'>\" ~ v.label\
|
||||
\ ~ \"</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 {\"flex-direction\"\
|
||||
: \"column\"},\n {\"align-items\": \"center\"}\n ]\n \
|
||||
\ }\n },\n \"extra_styles\": \"\n .tube-wrap.active .tube-bg\
|
||||
\ { box-shadow: 0 0 10px 2px var(--primary-color); } .tube-wrap.active\
|
||||
\ .slot-label { color: var(--primary-color); font-weight: 800; } \
|
||||
\ .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
|
||||
- type: horizontal-stack
|
||||
grid_options:
|
||||
columns: full
|
||||
cards:
|
||||
- type: markdown
|
||||
content: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_1_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
card_mod:
|
||||
style: 'ha-card { background: transparent; box-shadow: none; border: none;
|
||||
padding: 0 4px; margin: 0; text-align: left; } .markdown { padding:
|
||||
0; margin: 0; text-align: left; } p { margin: 0; padding: 0; text-align:
|
||||
left; font-size: 11px; line-height: 1; }'
|
||||
- type: markdown
|
||||
content: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_2_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
card_mod:
|
||||
style: 'ha-card { background: transparent; box-shadow: none; border: none;
|
||||
padding: 0 4px; margin: 0; text-align: left; } .markdown { padding:
|
||||
0; margin: 0; text-align: left; } p { margin: 0; padding: 0; text-align:
|
||||
left; font-size: 11px; line-height: 1; }'
|
||||
- type: markdown
|
||||
content: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_3_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
card_mod:
|
||||
style: 'ha-card { background: transparent; box-shadow: none; border: none;
|
||||
padding: 0 4px; margin: 0; text-align: left; } .markdown { padding:
|
||||
0; margin: 0; text-align: left; } p { margin: 0; padding: 0; text-align:
|
||||
left; font-size: 11px; line-height: 1; }'
|
||||
- type: markdown
|
||||
content: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_4_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
card_mod:
|
||||
style: 'ha-card { background: transparent; box-shadow: none; border: none;
|
||||
padding: 0 4px; margin: 0; text-align: left; } .markdown { padding:
|
||||
0; margin: 0; text-align: left; } p { margin: 0; padding: 0; text-align:
|
||||
left; font-size: 11px; line-height: 1; }'
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:water-percent
|
||||
name: Humidity
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:thermometer
|
||||
name: Temperature
|
||||
type: tile
|
||||
- cards:
|
||||
- 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')\
|
||||
\ %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_'\
|
||||
\ ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce)\
|
||||
\ | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1)\
|
||||
\ %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex')\
|
||||
\ and (state_attr(e[:-10], 'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10]\
|
||||
\ ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif\
|
||||
\ %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No\
|
||||
\ slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{\
|
||||
\ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} \u2192 spool {{\
|
||||
\ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id\
|
||||
\ ~ '_filament_name') }} \xB7 {{ ns.rem | round(1) }} g left)\n{% endif\
|
||||
\ %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: full
|
||||
type: horizontal-stack
|
||||
- heading: Last/Current Print Job
|
||||
heading_style: title
|
||||
icon: mdi:printer-3d
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_used_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:plus-minus
|
||||
name: Used Material Total
|
||||
type: tile
|
||||
- entity: sensor.sparkx_moonraker_print_eta
|
||||
features_position: bottom
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
name: Print ETA
|
||||
type: tile
|
||||
vertical: false
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in\
|
||||
\ ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n\
|
||||
{% endif %}"
|
||||
icon_color: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if\
|
||||
\ st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif\
|
||||
\ %}"
|
||||
multiline_secondary: true
|
||||
primary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w\
|
||||
\ = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in\
|
||||
\ ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1)\
|
||||
\ }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight')\
|
||||
\ | float(0) | round(1) }} g\n{% endif %}\n"
|
||||
secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set\
|
||||
\ c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing',\
|
||||
\ 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){%\
|
||||
\ else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost')\
|
||||
\ | float(0) | round(2) }} $ (last job)\n{% endif %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
- entity: sensor.sparkx_i7_expected_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: mdi:scale-balance
|
||||
icon_color: '{% set gcm = states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.0298) %}
|
||||
|
||||
{% set lencm = states(''sensor.sparkx_i7_expected_material_length'') | float(0)
|
||||
%}
|
||||
|
||||
{% set wgt = states(''sensor.sparkx_i7_expected_material_weight'') | float(0)
|
||||
%}
|
||||
|
||||
{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}
|
||||
|
||||
{% set used_g = ((states(''sensor.sparkx_i7_used_material_length'') | float(0))
|
||||
* gcm) | round(1) %}
|
||||
|
||||
{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}
|
||||
|
||||
{% set gc = namespace(list=[]) %}
|
||||
|
||||
{% for p in (state_attr(''sensor.sparkx_i7_expected_material_length'',''color'')
|
||||
| default('''', true) | string).split('';'') %}
|
||||
|
||||
{% set q = p | replace(''#'','''') | lower | trim %}
|
||||
|
||||
{% if q not in ['''',''none'',''unknown'',''unavailable''] %}{% set gc.list
|
||||
= gc.list + [q] %}{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set single = (gc.list | length) == 1 %}
|
||||
|
||||
{% set aslot = (states(''sensor.sparkx_i7_active_filament_slot'') | default('''',
|
||||
true) | string).split(''_'')[-1] %}
|
||||
|
||||
{% set aslot = aslot if aslot in [''1'',''2'',''3'',''4''] else '''' %}
|
||||
|
||||
{% set s = namespace(short=false, ok=false, matched=0, active=false) %}
|
||||
|
||||
{% for n in [''1'',''2'',''3'',''4''] %}
|
||||
|
||||
{% set sp = namespace(id='''', rem=-1) %}
|
||||
|
||||
{% for e in integration_entities(''spoolman'') if e.endswith(''_color_hex'')
|
||||
%}
|
||||
|
||||
{% if sp.id == '''' and (state_attr(e[:-10],''location'') | default('''',
|
||||
true) | lower) == (''cfs lite '' ~ n) %}
|
||||
|
||||
{% set sp.id = e[:-10] %}
|
||||
|
||||
{% set sp.rem = states(e[:-10]) | float(-1) %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if sp.id != '''' and sp.rem >= 0 %}
|
||||
|
||||
{% set s.matched = s.matched + 1 %}
|
||||
|
||||
{% if single %}
|
||||
|
||||
{% if n == aslot %}
|
||||
|
||||
{% set s.active = true %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set active = (states(''sensor.sparkx_i7_print_status'') | default('''',
|
||||
true)) in [''printing'',''paused''] %}
|
||||
|
||||
{% set v = namespace(state=''unknown'', label=''check unavailable'') %}
|
||||
|
||||
{% if not active %}
|
||||
|
||||
{% set v.state = ''idle'' %}
|
||||
|
||||
{% set v.label = ''no active print'' %}
|
||||
|
||||
{% elif job_g <= 0 %}
|
||||
|
||||
{% set v.state = ''none'' %}
|
||||
|
||||
{% set v.label = ''no slicer estimate yet'' %}
|
||||
|
||||
{% elif s.short %}
|
||||
|
||||
{% set v.state = ''short'' %}
|
||||
|
||||
{% set v.label = ''NOT ENOUGH'' %}
|
||||
|
||||
{% elif s.ok %}
|
||||
|
||||
{% set v.state = ''ok'' %}
|
||||
|
||||
{% set v.label = ''enough'' %}
|
||||
|
||||
{% elif single and aslot == '''' %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no active CFS slot'' %}
|
||||
|
||||
{% elif single and not s.active %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''active slot has no spool'' %}
|
||||
|
||||
{% elif s.matched == 0 %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no spool loaded'' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if v.state == ''ok'' %}green{% elif v.state == ''short'' %}red{% elif
|
||||
v.state in [''none'',''idle''] %}grey{% else %}orange{% endif %}'
|
||||
multiline_secondary: true
|
||||
name: Filament Sufficiency
|
||||
primary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298)\
|
||||
\ %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}no active print{% else %}{{ job_g }} g needed \xB7 {{ used_g }} g used{%\
|
||||
\ endif %}"
|
||||
secondary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') |\
|
||||
\ float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}last job: {{ job_g }} g needed{% else %}{{ rem_g }} g left to print\
|
||||
\ \xB7 {{ v.label }}{% endif %}"
|
||||
type: custom:mushroom-template-card
|
||||
- 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: sensor.sparkx_i7_real_time_flow
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 40
|
||||
min: 0
|
||||
name: Flow
|
||||
severity:
|
||||
green: 0
|
||||
red: 24
|
||||
yellow: 12
|
||||
type: gauge
|
||||
type: grid
|
||||
type: sections
|
||||
@@ -0,0 +1,499 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: 3d-printer-cellphone
|
||||
captured: '2026-10-18T06:04:51.942731+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- sections:
|
||||
- cards:
|
||||
- card:
|
||||
columns: 4
|
||||
square: false
|
||||
type: grid
|
||||
card_param: cards
|
||||
filter:
|
||||
template: "{% set ns = namespace(cards=[]) %}{% set active_n = (states('sensor.sparkx_i7_active_filament_slot').split('_')[-1]\
|
||||
\ | int(0)) if states('sensor.sparkx_i7_print_status') in ['printing',\
|
||||
\ 'paused'] else 0 %}\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)', vendor='') %}\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 '') %}{% set v.wrap = v.wrap ~ ' active' if (n == active_n)\
|
||||
\ else v.wrap %}\n {% set v.border = '#d0d0d0' if hex_clean | lower\
|
||||
\ in ['#ffffff', '#fff'] else 'transparent' %}\n {% set v.html = \"\
|
||||
<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 {% set v.vendor = (state_attr(sp.ent,\
|
||||
\ 'filament_vendor_name') | default('') | string | trim) %}{% set v.label\
|
||||
\ = 'Slot ' ~ n ~ (' \u26A0' if band > 0 else '') %}\n {% else %}\n \
|
||||
\ {% set v.html = \"<div class='tube-bg tube-empty'></div>\" %}\n \
|
||||
\ {% set v.label = \"<span class='slot-warn'>Slot \" ~ n ~ \" \u2014\
|
||||
\ empty</span>\" %}\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\": \"<div class='tube-wrap\"\
|
||||
\ ~ v.wrap ~ \"'>\" ~ ((\"<div class='slot-vendor'>\" ~ v.vendor ~ \"\
|
||||
</div>\") if v.vendor else '') ~ v.html ~ \"<div class='slot-label'>\"\
|
||||
\ ~ v.label ~ \"</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 {\"flex-direction\"\
|
||||
: \"column\"},\n {\"align-items\": \"center\"}\n ]\n \
|
||||
\ }\n },\n \"extra_styles\": \"\n .tube-wrap.active .tube-bg\
|
||||
\ { box-shadow: 0 0 10px 2px var(--primary-color); } .tube-wrap.active\
|
||||
\ .slot-label { color: var(--primary-color); font-weight: 800; } \
|
||||
\ .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 .slot-vendor {\n margin-bottom: 2px;\n font-size:\
|
||||
\ 9px;\n font-weight: 700;\n letter-spacing: 0.2px;\n \
|
||||
\ text-transform: uppercase;\n color: var(--secondary-text-color);\n\
|
||||
\ max-width: 70px;\n overflow: hidden;\n text-overflow:\
|
||||
\ ellipsis;\n white-space: nowrap;\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
|
||||
- type: horizontal-stack
|
||||
grid_options:
|
||||
columns: full
|
||||
cards:
|
||||
- type: markdown
|
||||
content: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_1_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
card_mod:
|
||||
style: 'ha-card { background: transparent; box-shadow: none; border: none;
|
||||
padding: 0 4px; margin: 0; text-align: left; } .markdown { padding:
|
||||
0; margin: 0; text-align: left; } p { margin: 0; padding: 0; text-align:
|
||||
left; font-size: 11px; line-height: 1; }'
|
||||
- type: markdown
|
||||
content: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_2_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
card_mod:
|
||||
style: 'ha-card { background: transparent; box-shadow: none; border: none;
|
||||
padding: 0 4px; margin: 0; text-align: left; } .markdown { padding:
|
||||
0; margin: 0; text-align: left; } p { margin: 0; padding: 0; text-align:
|
||||
left; font-size: 11px; line-height: 1; }'
|
||||
- type: markdown
|
||||
content: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_3_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
card_mod:
|
||||
style: 'ha-card { background: transparent; box-shadow: none; border: none;
|
||||
padding: 0 4px; margin: 0; text-align: left; } .markdown { padding:
|
||||
0; margin: 0; text-align: left; } p { margin: 0; padding: 0; text-align:
|
||||
left; font-size: 11px; line-height: 1; }'
|
||||
- type: markdown
|
||||
content: '{% 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) %}{{ live | round(1) }}g{% else %}{{ (states(''input_number.sparkx_i7_slot_4_grams'')
|
||||
| float(0)) | round(1) }}g{% endif %}'
|
||||
card_mod:
|
||||
style: 'ha-card { background: transparent; box-shadow: none; border: none;
|
||||
padding: 0 4px; margin: 0; text-align: left; } .markdown { padding:
|
||||
0; margin: 0; text-align: left; } p { margin: 0; padding: 0; text-align:
|
||||
left; font-size: 11px; line-height: 1; }'
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:water-percent
|
||||
name: Humidity
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:thermometer
|
||||
name: Temperature
|
||||
type: tile
|
||||
- cards:
|
||||
- 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')\
|
||||
\ %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_'\
|
||||
\ ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce)\
|
||||
\ | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1)\
|
||||
\ %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex')\
|
||||
\ and (state_attr(e[:-10], 'location') | default('', true) | lower) ==\
|
||||
\ ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10]\
|
||||
\ ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif\
|
||||
\ %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No\
|
||||
\ slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{\
|
||||
\ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} \u2192 spool {{\
|
||||
\ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper\
|
||||
\ }} \u2192 spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id\
|
||||
\ ~ '_filament_name') }} \xB7 {{ ns.rem | round(1) }} g left)\n{% endif\
|
||||
\ %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: full
|
||||
type: horizontal-stack
|
||||
- heading: Last/Current Print Job
|
||||
heading_style: title
|
||||
icon: mdi:printer-3d
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_used_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
icon: mdi:plus-minus
|
||||
name: Used Material Total
|
||||
type: tile
|
||||
- entity: sensor.sparkx_moonraker_print_eta
|
||||
features_position: bottom
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 1
|
||||
name: Print ETA
|
||||
type: tile
|
||||
vertical: false
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in\
|
||||
\ ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n\
|
||||
{% endif %}"
|
||||
icon_color: "{% set st = states('sensor.sparkx_i7_print_status') %} {% if\
|
||||
\ st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif\
|
||||
\ %}"
|
||||
multiline_secondary: true
|
||||
primary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w\
|
||||
\ = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in\
|
||||
\ ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1)\
|
||||
\ }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight')\
|
||||
\ | float(0) | round(1) }} g\n{% endif %}\n"
|
||||
secondary: "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set\
|
||||
\ c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing',\
|
||||
\ 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){%\
|
||||
\ else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost')\
|
||||
\ | float(0) | round(2) }} $ (last job)\n{% endif %}\n"
|
||||
type: custom:mushroom-template-card
|
||||
- entity: sensor.sparkx_i7_expected_material_length
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: auto
|
||||
icon: mdi:scale-balance
|
||||
icon_color: '{% set gcm = states(''input_number.sparkx_i7_filament_g_cm'')
|
||||
| float(0.0298) %}
|
||||
|
||||
{% set lencm = states(''sensor.sparkx_i7_expected_material_length'') | float(0)
|
||||
%}
|
||||
|
||||
{% set wgt = states(''sensor.sparkx_i7_expected_material_weight'') | float(0)
|
||||
%}
|
||||
|
||||
{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}
|
||||
|
||||
{% set used_g = ((states(''sensor.sparkx_i7_used_material_length'') | float(0))
|
||||
* gcm) | round(1) %}
|
||||
|
||||
{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}
|
||||
|
||||
{% set gc = namespace(list=[]) %}
|
||||
|
||||
{% for p in (state_attr(''sensor.sparkx_i7_expected_material_length'',''color'')
|
||||
| default('''', true) | string).split('';'') %}
|
||||
|
||||
{% set q = p | replace(''#'','''') | lower | trim %}
|
||||
|
||||
{% if q not in ['''',''none'',''unknown'',''unavailable''] %}{% set gc.list
|
||||
= gc.list + [q] %}{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set single = (gc.list | length) == 1 %}
|
||||
|
||||
{% set aslot = (states(''sensor.sparkx_i7_active_filament_slot'') | default('''',
|
||||
true) | string).split(''_'')[-1] %}
|
||||
|
||||
{% set aslot = aslot if aslot in [''1'',''2'',''3'',''4''] else '''' %}
|
||||
|
||||
{% set s = namespace(short=false, ok=false, matched=0, active=false) %}
|
||||
|
||||
{% for n in [''1'',''2'',''3'',''4''] %}
|
||||
|
||||
{% set sp = namespace(id='''', rem=-1) %}
|
||||
|
||||
{% for e in integration_entities(''spoolman'') if e.endswith(''_color_hex'')
|
||||
%}
|
||||
|
||||
{% if sp.id == '''' and (state_attr(e[:-10],''location'') | default('''',
|
||||
true) | lower) == (''cfs lite '' ~ n) %}
|
||||
|
||||
{% set sp.id = e[:-10] %}
|
||||
|
||||
{% set sp.rem = states(e[:-10]) | float(-1) %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% if sp.id != '''' and sp.rem >= 0 %}
|
||||
|
||||
{% set s.matched = s.matched + 1 %}
|
||||
|
||||
{% if single %}
|
||||
|
||||
{% if n == aslot %}
|
||||
|
||||
{% set s.active = true %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true
|
||||
%}{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
{% set active = (states(''sensor.sparkx_i7_print_status'') | default('''',
|
||||
true)) in [''printing'',''paused''] %}
|
||||
|
||||
{% set v = namespace(state=''unknown'', label=''check unavailable'') %}
|
||||
|
||||
{% if not active %}
|
||||
|
||||
{% set v.state = ''idle'' %}
|
||||
|
||||
{% set v.label = ''no active print'' %}
|
||||
|
||||
{% elif job_g <= 0 %}
|
||||
|
||||
{% set v.state = ''none'' %}
|
||||
|
||||
{% set v.label = ''no slicer estimate yet'' %}
|
||||
|
||||
{% elif s.short %}
|
||||
|
||||
{% set v.state = ''short'' %}
|
||||
|
||||
{% set v.label = ''NOT ENOUGH'' %}
|
||||
|
||||
{% elif s.ok %}
|
||||
|
||||
{% set v.state = ''ok'' %}
|
||||
|
||||
{% set v.label = ''enough'' %}
|
||||
|
||||
{% elif single and aslot == '''' %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no active CFS slot'' %}
|
||||
|
||||
{% elif single and not s.active %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''active slot has no spool'' %}
|
||||
|
||||
{% elif s.matched == 0 %}
|
||||
|
||||
{% set v.state = ''unknown'' %}
|
||||
|
||||
{% set v.label = ''no spool loaded'' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if v.state == ''ok'' %}green{% elif v.state == ''short'' %}red{% elif
|
||||
v.state in [''none'',''idle''] %}grey{% else %}orange{% endif %}'
|
||||
multiline_secondary: true
|
||||
name: Filament Sufficiency
|
||||
primary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298)\
|
||||
\ %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}no active print{% else %}{{ job_g }} g needed \xB7 {{ used_g }} g used{%\
|
||||
\ endif %}"
|
||||
secondary: "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') |\
|
||||
\ float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length')\
|
||||
\ | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight')\
|
||||
\ | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1))\
|
||||
\ %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length')\
|
||||
\ | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0]\
|
||||
\ | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color')\
|
||||
\ | default('', true) | string).split(';') %}\n{% set q = p | replace('#','')\
|
||||
\ | lower | trim %}\n{% if q not in ['','none','unknown','unavailable']\
|
||||
\ %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single\
|
||||
\ = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot')\
|
||||
\ | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot\
|
||||
\ if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false,\
|
||||
\ ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n\
|
||||
{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman')\
|
||||
\ if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location')\
|
||||
\ | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10]\
|
||||
\ %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor\
|
||||
\ %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched\
|
||||
\ + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n\
|
||||
{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true\
|
||||
\ %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set\
|
||||
\ s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif\
|
||||
\ %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status')\
|
||||
\ | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown',\
|
||||
\ label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle'\
|
||||
\ %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set\
|
||||
\ v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{%\
|
||||
\ elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH'\
|
||||
\ %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough'\
|
||||
\ %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active\
|
||||
\ %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no\
|
||||
\ spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n\
|
||||
{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle'\
|
||||
\ %}last job: {{ job_g }} g needed{% else %}{{ rem_g }} g left to print\
|
||||
\ \xB7 {{ v.label }}{% endif %}"
|
||||
type: custom:mushroom-template-card
|
||||
- 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: sensor.sparkx_i7_real_time_flow
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 40
|
||||
min: 0
|
||||
name: Flow
|
||||
severity:
|
||||
green: 0
|
||||
red: 24
|
||||
yellow: 12
|
||||
type: gauge
|
||||
type: grid
|
||||
type: sections
|
||||
@@ -0,0 +1,787 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: printer-stats
|
||||
captured: '2026-10-10T06:18:30.555566+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- title: Print
|
||||
path: print
|
||||
type: sections
|
||||
max_columns: 4
|
||||
sections:
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Printer Status
|
||||
icon: mdi:printer-3d-nozzle
|
||||
- type: custom:webrtc-camera
|
||||
url: octoprint
|
||||
ui: true
|
||||
- type: custom:webrtc-camera
|
||||
url: octoprint2
|
||||
ui: true
|
||||
- type: tile
|
||||
entity: binary_sensor.octoprint_printing
|
||||
name: Printing
|
||||
icon: mdi:printer-3d
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: binary_sensor.octoprint_connected
|
||||
name: Connected
|
||||
icon: mdi:lan-connect
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.octoprint_print_status
|
||||
name: Status
|
||||
icon: mdi:state-machine
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.octoprint_last_event
|
||||
name: Last Event
|
||||
icon: mdi:history
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: binary_sensor.octoprint_paused
|
||||
name: Paused
|
||||
icon: mdi:pause
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.octoprint_current_z
|
||||
name: Current Z
|
||||
icon: mdi:axis-z-arrow
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: markdown
|
||||
content: '**File:** {{ states(''sensor.octoprint_print_file'') }}
|
||||
|
||||
**Size:** {{ (states(''sensor.octoprint_print_file_size'') | int(0) / 1048576)
|
||||
| round(2) }} MB
|
||||
|
||||
**User:** {{ states(''sensor.octoprint_print_user'') }}'
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: tile
|
||||
entity: sensor.octoprint_print_file
|
||||
name: File
|
||||
icon: mdi:file-code
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Print Progress
|
||||
icon: mdi:progress-clock
|
||||
- type: gauge
|
||||
entity: sensor.octoprint_print_progress_live
|
||||
name: Progress
|
||||
min: 0
|
||||
max: 100
|
||||
unit: '%'
|
||||
severity:
|
||||
green: 0
|
||||
yellow: 40
|
||||
red: 90
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 3
|
||||
- type: custom:mushroom-template-card
|
||||
primary: Elapsed
|
||||
name: Elapsed
|
||||
icon: mdi:clock-start
|
||||
grid_options:
|
||||
columns: 6
|
||||
multiline_secondary: true
|
||||
secondary: '{% set s = states(''sensor.octoprint_elapsed'') | 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
|
||||
primary: Remaining
|
||||
name: Remaining
|
||||
icon: mdi:clock-end
|
||||
grid_options:
|
||||
columns: 6
|
||||
multiline_secondary: true
|
||||
secondary: '{% set s = states(''sensor.octoprint_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
|
||||
primary: Est. Finish
|
||||
secondary: "{% set finish = states('sensor.octoprint_approximate_completion_time')\
|
||||
\ | as_datetime %}{% if finish %}{{ (as_local(finish)).strftime('%I:%M %p').lstrip('0')\
|
||||
\ }}{% else %}\u2014{% endif %}"
|
||||
multiline_secondary: true
|
||||
icon: mdi:clock-outline
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: custom:mushroom-template-card
|
||||
primary: Layer
|
||||
name: Layer
|
||||
icon: mdi:layers
|
||||
grid_options:
|
||||
columns: 6
|
||||
multiline_secondary: true
|
||||
secondary: '{% set c = states(''sensor.octoprint_layer_progress'') | int(0)
|
||||
%}{% set t = state_attr(''sensor.octoprint_layer_progress'', ''total'')
|
||||
| int(0) %}{{ c }} of {{ t }}'
|
||||
- type: custom:mushroom-template-card
|
||||
primary: Height
|
||||
name: Height
|
||||
icon: mdi:axis-z-arrow
|
||||
grid_options:
|
||||
columns: 6
|
||||
secondary: '{% set c = states(''sensor.octoprint_height_progress_clean'')
|
||||
| float(0) %}{% set t = state_attr(''sensor.octoprint_height_progress_clean'',
|
||||
''total'') | float(0) %}{{ c }} of {{ t }} mm'
|
||||
multiline_secondary: true
|
||||
- type: tile
|
||||
entity: light.3d_printer_lights_local
|
||||
name: Printer Light
|
||||
icon: mdi:lightbulb
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: sensor
|
||||
entity: sensor.octoprint_print_progress_live
|
||||
name: Progress History
|
||||
graph: line
|
||||
hours_to_show: 24
|
||||
detail: 1
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Temperatures
|
||||
icon: mdi:thermometer
|
||||
- type: gauge
|
||||
entity: sensor.octoprint_tool_0_temperature
|
||||
name: Nozzle
|
||||
min: 0
|
||||
max: 260
|
||||
unit: "\xB0C"
|
||||
severity:
|
||||
green: 0
|
||||
yellow: 180
|
||||
red: 240
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: gauge
|
||||
entity: sensor.octoprint_bed_temperature
|
||||
name: Bed
|
||||
min: 0
|
||||
max: 120
|
||||
unit: "\xB0C"
|
||||
severity:
|
||||
green: 0
|
||||
yellow: 60
|
||||
red: 100
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: gauge
|
||||
entity: sensor.octoprint_soc_temperature
|
||||
name: SoC
|
||||
min: 0
|
||||
max: 100
|
||||
unit: "\xB0C"
|
||||
severity:
|
||||
green: 0
|
||||
yellow: 70
|
||||
red: 90
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_tool_0_target
|
||||
name: Nozzle Target
|
||||
icon: mdi:printer-3d-nozzle
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.octoprint_bed_target
|
||||
name: Bed Target
|
||||
icon: mdi:radiator
|
||||
grid_options:
|
||||
columns: 6
|
||||
- title: Nozzle Temperature
|
||||
type: history-graph
|
||||
entities:
|
||||
- entity: sensor.octoprint_tool_0_temperature
|
||||
name: Actual
|
||||
color: '#ef5350'
|
||||
- entity: sensor.octoprint_tool_0_target
|
||||
name: Target
|
||||
color: '#4caf50'
|
||||
hours_to_show: 24
|
||||
show_names: true
|
||||
expand_legend: true
|
||||
grid_options:
|
||||
columns: full
|
||||
- title: Bed Temperature
|
||||
type: history-graph
|
||||
entities:
|
||||
- entity: sensor.octoprint_bed_temperature
|
||||
name: Actual
|
||||
color: '#42a5f5'
|
||||
- entity: sensor.octoprint_bed_target
|
||||
name: Target
|
||||
color: '#4caf50'
|
||||
hours_to_show: 24
|
||||
show_names: true
|
||||
expand_legend: true
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Controls
|
||||
icon: mdi:gesture-tap-button
|
||||
- type: tile
|
||||
entity: switch.octoprint_pause_print
|
||||
name: Pause
|
||||
icon: mdi:pause
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: switch.octoprint_connect_to_printer
|
||||
name: Connect
|
||||
icon: mdi:lan-connect
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: switch.octoprint_camera_snapshot
|
||||
name: Snapshot
|
||||
icon: mdi:camera
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: button.octoprint_cancel_print
|
||||
name: Cancel Print
|
||||
icon: mdi:cancel
|
||||
tap_action:
|
||||
action: perform-action
|
||||
perform_action: button.press
|
||||
target:
|
||||
entity_id: button.octoprint_cancel_print
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: button.octoprint_emergency_stop
|
||||
name: Emergency Stop
|
||||
icon: mdi:stop-circle
|
||||
tap_action:
|
||||
action: perform-action
|
||||
perform_action: button.press
|
||||
target:
|
||||
entity_id: button.octoprint_emergency_stop
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: button
|
||||
name: GCode Viewer
|
||||
icon: mdi:cube-outline
|
||||
tap_action:
|
||||
action: url
|
||||
url_path: https://ender5pro.duckdns.org/#gcode
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: button
|
||||
name: Pretty GCode Viewer
|
||||
icon: mdi:cube-outline
|
||||
tap_action:
|
||||
action: url
|
||||
url_path: https://ender5pro.duckdns.org/#tab_plugin_prettygcode
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Totals
|
||||
icon: mdi:chart-box-outline
|
||||
- type: tile
|
||||
entity: sensor.octoprint_printer_print_time_today
|
||||
name: Print Time Today
|
||||
icon: mdi:clock-start
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_printer_print_time_this_week
|
||||
name: Print Time This Week
|
||||
icon: mdi:calendar-week
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
grid_options:
|
||||
columns: 4
|
||||
entity: sensor.octoprint_printer_print_time_last_7_days
|
||||
name: Print Time Last 7 Days
|
||||
icon: mdi:history
|
||||
vertical: false
|
||||
features_position: bottom
|
||||
- type: tile
|
||||
entity: sensor.octoprint_printer_prints_today
|
||||
name: Prints Today
|
||||
icon: mdi:counter
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_printer_prints_this_week
|
||||
name: Prints This Week
|
||||
icon: mdi:counter
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_printer_prints_last_7_days
|
||||
name: Prints Last 7 Days
|
||||
icon: mdi:counter
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Filament Usage
|
||||
icon: mdi:chart-donut
|
||||
- type: tile
|
||||
entity: sensor.octoprint_last_print_filament
|
||||
name: Last Job
|
||||
icon: mdi:history
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_daily
|
||||
name: Filament Today
|
||||
icon: mdi:chart-donut
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_weekly
|
||||
name: Filament This Week
|
||||
icon: mdi:calendar-week
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_monthly
|
||||
name: Filament This Month
|
||||
icon: mdi:calendar-month
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_used_total
|
||||
name: Grand Total
|
||||
icon: mdi:chart-pie
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: heading
|
||||
heading: Grams Usage
|
||||
icon: mdi:weight
|
||||
- type: tile
|
||||
entity: sensor.octoprint_last_print_filament_weight
|
||||
name: Last Job
|
||||
icon: mdi:history
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_weight_daily
|
||||
name: Filament Today
|
||||
icon: mdi:chart-donut
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_weight_weekly
|
||||
name: Filament This Week
|
||||
icon: mdi:calendar-week
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_weight_monthly
|
||||
name: Filament This Month
|
||||
icon: mdi:calendar-month
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_used_weight_total
|
||||
name: Grand Total
|
||||
icon: mdi:chart-pie
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: heading
|
||||
heading: Cost Usage
|
||||
icon: mdi:cash-multiple
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_cost_last_job
|
||||
name: Last Job
|
||||
icon: mdi:history
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_cost_daily
|
||||
name: Cost Today
|
||||
icon: mdi:chart-donut
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_cost_weekly
|
||||
name: Cost This Week
|
||||
icon: mdi:calendar-week
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_cost_monthly
|
||||
name: Cost This Month
|
||||
icon: mdi:calendar-month
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_cost_total
|
||||
name: Grand Total
|
||||
icon: mdi:chart-pie
|
||||
grid_options:
|
||||
columns: 4
|
||||
- title: History
|
||||
path: history
|
||||
type: sections
|
||||
max_columns: 2
|
||||
sections:
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Temperature History
|
||||
icon: mdi:chart-line-variant
|
||||
- type: history-graph
|
||||
title: Temperatures (24h)
|
||||
hours_to_show: 24
|
||||
show_names: true
|
||||
expand_legend: true
|
||||
entities:
|
||||
- entity: sensor.octoprint_tool_0_temperature
|
||||
name: Nozzle
|
||||
color: '#ef5350'
|
||||
- entity: sensor.octoprint_tool_0_target
|
||||
name: Nozzle Target
|
||||
color: '#ffab91'
|
||||
- entity: sensor.octoprint_bed_temperature
|
||||
name: Bed
|
||||
color: '#42a5f5'
|
||||
- entity: sensor.octoprint_bed_target
|
||||
name: Bed Target
|
||||
color: '#90caf9'
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: history-graph
|
||||
title: Temperatures (7 days)
|
||||
hours_to_show: 168
|
||||
show_names: true
|
||||
expand_legend: true
|
||||
entities:
|
||||
- entity: sensor.octoprint_tool_0_temperature
|
||||
name: Nozzle
|
||||
color: '#ef5350'
|
||||
- entity: sensor.octoprint_bed_temperature
|
||||
name: Bed
|
||||
color: '#42a5f5'
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Print Activity
|
||||
icon: mdi:chart-box-outline
|
||||
- type: custom:apexcharts-card
|
||||
header:
|
||||
show: true
|
||||
title: Z Position (24h)
|
||||
show_states: true
|
||||
colorize_states: true
|
||||
graph_span: 24h
|
||||
series:
|
||||
- entity: sensor.octoprint_current_z
|
||||
name: Current Z
|
||||
color: '#ab47bc'
|
||||
type: line
|
||||
curve: straight
|
||||
fill_raw: last
|
||||
grid_options:
|
||||
columns: full
|
||||
apex_config:
|
||||
chart:
|
||||
height: 300
|
||||
stroke:
|
||||
width: 1
|
||||
- type: history-graph
|
||||
title: Print Progress (24h)
|
||||
hours_to_show: 24
|
||||
show_names: true
|
||||
entities:
|
||||
- entity: sensor.octoprint_print_progress_live
|
||||
name: Progress
|
||||
color: '#66bb6a'
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: history-graph
|
||||
title: Print Duration (24h)
|
||||
hours_to_show: 24
|
||||
show_names: true
|
||||
entities:
|
||||
- entity: sensor.octoprint_elapsed
|
||||
name: Elapsed
|
||||
color: '#26c6da'
|
||||
- entity: sensor.octoprint_time_left
|
||||
name: Remaining
|
||||
color: '#ffa726'
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Print History
|
||||
icon: mdi:history
|
||||
- type: markdown
|
||||
content: '**Successful:** {{ states(''sensor.octoprint_successful_prints_count'')
|
||||
}} | **Failed:** {{ states(''sensor.octoprint_failed_prints_count'') }}'
|
||||
- type: history-graph
|
||||
title: Printing State (7 days)
|
||||
hours_to_show: 168
|
||||
show_names: true
|
||||
entities:
|
||||
- entity: binary_sensor.octoprint_printing
|
||||
name: Printing
|
||||
color: '#66bb6a'
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: custom:apexcharts-card
|
||||
header:
|
||||
show: true
|
||||
title: Print Outcomes (30 days)
|
||||
show_states: true
|
||||
colorize_states: true
|
||||
graph_span: 30d
|
||||
apex_config:
|
||||
chart:
|
||||
type: bar
|
||||
stacked: true
|
||||
height: 300
|
||||
plotOptions:
|
||||
bar:
|
||||
columnWidth: 50%
|
||||
dataLabels:
|
||||
enabled: true
|
||||
yaxis:
|
||||
tickAmount: 4
|
||||
labels:
|
||||
minWidth: 40
|
||||
legend:
|
||||
show: true
|
||||
series:
|
||||
- entity: sensor.octoprint_successful_prints_count
|
||||
name: Successful
|
||||
color: '#66bb6a'
|
||||
type: column
|
||||
group_by:
|
||||
func: diff
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
- entity: sensor.octoprint_failed_prints_count
|
||||
name: Failed
|
||||
color: '#ef5350'
|
||||
type: column
|
||||
group_by:
|
||||
func: diff
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
grid_options:
|
||||
columns: full
|
||||
span:
|
||||
end: day
|
||||
- type: markdown
|
||||
title: Recent Prints
|
||||
content: "{% for j in (state_attr('sensor.octoprint_recent_prints', 'allPrintJobs')\
|
||||
\ | default([]))[:5] %}\n{% set d = j.get('duration', 0) | int %}\n- **{{\
|
||||
\ j.fileName }}** \u2014 {{ j.printStatusResult | title }}, {{ (d / 3600)\
|
||||
\ | int }}h {{ ((d % 3600) / 60) | int }}m, {{ j.get('filamentModels', {}).get('total',\
|
||||
\ {}).get('usedLength', 0) | round(0) }}mm\n{% endfor %}"
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Filament Usage
|
||||
icon: mdi:spool
|
||||
- type: custom:apexcharts-card
|
||||
header:
|
||||
show: true
|
||||
title: Filament Usage (30 days)
|
||||
show_states: true
|
||||
colorize_states: true
|
||||
graph_span: 30d
|
||||
apex_config:
|
||||
chart:
|
||||
type: bar
|
||||
height: 300
|
||||
plotOptions:
|
||||
bar:
|
||||
columnWidth: 50%
|
||||
dataLabels:
|
||||
enabled: false
|
||||
yaxis:
|
||||
tickAmount: 4
|
||||
labels:
|
||||
minWidth: 40
|
||||
series:
|
||||
- entity: sensor.octoprint_filament_daily
|
||||
name: Used (mm)
|
||||
color: '#26c6da'
|
||||
type: column
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
- entity: sensor.octoprint_filament_used_total
|
||||
name: Total (mm)
|
||||
color: '#ab47bc'
|
||||
type: line
|
||||
curve: straight
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
- entity: sensor.octoprint_filament_weekly
|
||||
name: Weekly (mm)
|
||||
color: '#ffca28'
|
||||
type: column
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
grid_options:
|
||||
columns: full
|
||||
span:
|
||||
end: day
|
||||
- type: custom:apexcharts-card
|
||||
header:
|
||||
show: true
|
||||
title: Filament Usage - Grams (30 days)
|
||||
show_states: true
|
||||
colorize_states: true
|
||||
graph_span: 30d
|
||||
apex_config:
|
||||
chart:
|
||||
type: bar
|
||||
height: 300
|
||||
plotOptions:
|
||||
bar:
|
||||
columnWidth: 50%
|
||||
dataLabels:
|
||||
enabled: false
|
||||
yaxis:
|
||||
tickAmount: 4
|
||||
labels:
|
||||
minWidth: 40
|
||||
series:
|
||||
- entity: sensor.octoprint_filament_weight_daily
|
||||
name: Used (g)
|
||||
color: '#26c6da'
|
||||
type: column
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
- entity: sensor.octoprint_filament_used_weight_total
|
||||
name: Total (g)
|
||||
color: '#ab47bc'
|
||||
type: line
|
||||
curve: straight
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
- entity: sensor.octoprint_filament_weight_weekly
|
||||
name: Weekly (g)
|
||||
color: '#ffca28'
|
||||
type: column
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
grid_options:
|
||||
columns: full
|
||||
span:
|
||||
end: day
|
||||
- type: custom:apexcharts-card
|
||||
header:
|
||||
show: true
|
||||
title: Filament Usage - Cost (30 days)
|
||||
show_states: true
|
||||
colorize_states: true
|
||||
graph_span: 30d
|
||||
apex_config:
|
||||
chart:
|
||||
type: bar
|
||||
height: 300
|
||||
plotOptions:
|
||||
bar:
|
||||
columnWidth: 50%
|
||||
dataLabels:
|
||||
enabled: false
|
||||
yaxis:
|
||||
tickAmount: 4
|
||||
labels:
|
||||
minWidth: 40
|
||||
series:
|
||||
- entity: sensor.octoprint_filament_cost_daily
|
||||
name: Used ($)
|
||||
color: '#26c6da'
|
||||
type: column
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
- entity: sensor.octoprint_filament_cost_weekly
|
||||
name: Weekly ($)
|
||||
color: '#ffca28'
|
||||
type: column
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
- entity: sensor.octoprint_filament_cost_total
|
||||
name: Total ($)
|
||||
color: '#ab47bc'
|
||||
type: line
|
||||
curve: straight
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
grid_options:
|
||||
columns: full
|
||||
span:
|
||||
end: day
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: OctoPrint Host
|
||||
icon: mdi:server
|
||||
- type: tile
|
||||
entity: sensor.octoprint_disk_usage
|
||||
icon: mdi:harddisk
|
||||
- type: tile
|
||||
entity: sensor.octoprint_cpu_usage
|
||||
icon: mdi:cpu-64-bit
|
||||
- type: tile
|
||||
entity: sensor.octoprint_memory_usage
|
||||
icon: mdi:memory
|
||||
- type: tile
|
||||
entity: sensor.octoprint_core_0_temperature
|
||||
icon: mdi:thermometer
|
||||
- type: tile
|
||||
entity: sensor.octoprint_uptime
|
||||
icon: mdi:clock-outline
|
||||
- type: sections
|
||||
max_columns: 4
|
||||
title: Test
|
||||
path: test
|
||||
sections:
|
||||
- type: grid
|
||||
cards: []
|
||||
@@ -0,0 +1,969 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: printer-stats
|
||||
captured: '2026-10-10T07:02:52.536646+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- title: Print
|
||||
path: print
|
||||
type: sections
|
||||
max_columns: 4
|
||||
sections:
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Printer Status
|
||||
icon: mdi:printer-3d-nozzle
|
||||
- type: custom:webrtc-camera
|
||||
url: octoprint
|
||||
ui: true
|
||||
- type: custom:webrtc-camera
|
||||
url: octoprint2
|
||||
ui: true
|
||||
- type: tile
|
||||
entity: binary_sensor.octoprint_printing
|
||||
name: Printing
|
||||
icon: mdi:printer-3d
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: binary_sensor.octoprint_connected
|
||||
name: Connected
|
||||
icon: mdi:lan-connect
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.octoprint_print_status
|
||||
name: Status
|
||||
icon: mdi:state-machine
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.octoprint_last_event
|
||||
name: Last Event
|
||||
icon: mdi:history
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: binary_sensor.octoprint_paused
|
||||
name: Paused
|
||||
icon: mdi:pause
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.octoprint_current_z
|
||||
name: Current Z
|
||||
icon: mdi:axis-z-arrow
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: markdown
|
||||
content: '**File:** {{ states(''sensor.octoprint_print_file'') }}
|
||||
|
||||
**Size:** {{ (states(''sensor.octoprint_print_file_size'') | int(0) / 1048576)
|
||||
| round(2) }} MB
|
||||
|
||||
**User:** {{ states(''sensor.octoprint_print_user'') }}'
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: tile
|
||||
entity: sensor.octoprint_print_file
|
||||
name: File
|
||||
icon: mdi:file-code
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Print Progress
|
||||
icon: mdi:progress-clock
|
||||
- type: gauge
|
||||
entity: sensor.octoprint_print_progress_live
|
||||
name: Progress
|
||||
min: 0
|
||||
max: 100
|
||||
unit: '%'
|
||||
severity:
|
||||
green: 0
|
||||
yellow: 40
|
||||
red: 90
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 3
|
||||
- type: custom:mushroom-template-card
|
||||
primary: Elapsed
|
||||
name: Elapsed
|
||||
icon: mdi:clock-start
|
||||
grid_options:
|
||||
columns: 6
|
||||
multiline_secondary: true
|
||||
secondary: '{% set s = states(''sensor.octoprint_elapsed'') | 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
|
||||
primary: Remaining
|
||||
name: Remaining
|
||||
icon: mdi:clock-end
|
||||
grid_options:
|
||||
columns: 6
|
||||
multiline_secondary: true
|
||||
secondary: '{% set s = states(''sensor.octoprint_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
|
||||
primary: Est. Finish
|
||||
secondary: "{% set finish = states('sensor.octoprint_approximate_completion_time')\
|
||||
\ | as_datetime %}{% if finish %}{{ (as_local(finish)).strftime('%I:%M %p').lstrip('0')\
|
||||
\ }}{% else %}\u2014{% endif %}"
|
||||
multiline_secondary: true
|
||||
icon: mdi:clock-outline
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: custom:mushroom-template-card
|
||||
primary: Layer
|
||||
name: Layer
|
||||
icon: mdi:layers
|
||||
grid_options:
|
||||
columns: 6
|
||||
multiline_secondary: true
|
||||
secondary: '{% set c = states(''sensor.octoprint_layer_progress'') | int(0)
|
||||
%}{% set t = state_attr(''sensor.octoprint_layer_progress'', ''total'')
|
||||
| int(0) %}{{ c }} of {{ t }}'
|
||||
- type: custom:mushroom-template-card
|
||||
primary: Height
|
||||
name: Height
|
||||
icon: mdi:axis-z-arrow
|
||||
grid_options:
|
||||
columns: 6
|
||||
secondary: '{% set c = states(''sensor.octoprint_height_progress_clean'')
|
||||
| float(0) %}{% set t = state_attr(''sensor.octoprint_height_progress_clean'',
|
||||
''total'') | float(0) %}{{ c }} of {{ t }} mm'
|
||||
multiline_secondary: true
|
||||
- type: tile
|
||||
entity: light.3d_printer_lights_local
|
||||
name: Printer Light
|
||||
icon: mdi:lightbulb
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: sensor
|
||||
entity: sensor.octoprint_print_progress_live
|
||||
name: Progress History
|
||||
graph: line
|
||||
hours_to_show: 24
|
||||
detail: 1
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Temperatures
|
||||
icon: mdi:thermometer
|
||||
- type: gauge
|
||||
entity: sensor.octoprint_tool_0_temperature
|
||||
name: Nozzle
|
||||
min: 0
|
||||
max: 260
|
||||
unit: "\xB0C"
|
||||
severity:
|
||||
green: 0
|
||||
yellow: 180
|
||||
red: 240
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: gauge
|
||||
entity: sensor.octoprint_bed_temperature
|
||||
name: Bed
|
||||
min: 0
|
||||
max: 120
|
||||
unit: "\xB0C"
|
||||
severity:
|
||||
green: 0
|
||||
yellow: 60
|
||||
red: 100
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: gauge
|
||||
entity: sensor.octoprint_soc_temperature
|
||||
name: SoC
|
||||
min: 0
|
||||
max: 100
|
||||
unit: "\xB0C"
|
||||
severity:
|
||||
green: 0
|
||||
yellow: 70
|
||||
red: 90
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_tool_0_target
|
||||
name: Nozzle Target
|
||||
icon: mdi:printer-3d-nozzle
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.octoprint_bed_target
|
||||
name: Bed Target
|
||||
icon: mdi:radiator
|
||||
grid_options:
|
||||
columns: 6
|
||||
- title: Nozzle Temperature
|
||||
type: history-graph
|
||||
entities:
|
||||
- entity: sensor.octoprint_tool_0_temperature
|
||||
name: Actual
|
||||
color: '#ef5350'
|
||||
- entity: sensor.octoprint_tool_0_target
|
||||
name: Target
|
||||
color: '#4caf50'
|
||||
hours_to_show: 24
|
||||
show_names: true
|
||||
expand_legend: true
|
||||
grid_options:
|
||||
columns: full
|
||||
- title: Bed Temperature
|
||||
type: history-graph
|
||||
entities:
|
||||
- entity: sensor.octoprint_bed_temperature
|
||||
name: Actual
|
||||
color: '#42a5f5'
|
||||
- entity: sensor.octoprint_bed_target
|
||||
name: Target
|
||||
color: '#4caf50'
|
||||
hours_to_show: 24
|
||||
show_names: true
|
||||
expand_legend: true
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Controls
|
||||
icon: mdi:gesture-tap-button
|
||||
- type: tile
|
||||
entity: switch.octoprint_pause_print
|
||||
name: Pause
|
||||
icon: mdi:pause
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: switch.octoprint_connect_to_printer
|
||||
name: Connect
|
||||
icon: mdi:lan-connect
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: switch.octoprint_camera_snapshot
|
||||
name: Snapshot
|
||||
icon: mdi:camera
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: button.octoprint_cancel_print
|
||||
name: Cancel Print
|
||||
icon: mdi:cancel
|
||||
tap_action:
|
||||
action: perform-action
|
||||
perform_action: button.press
|
||||
target:
|
||||
entity_id: button.octoprint_cancel_print
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: button.octoprint_emergency_stop
|
||||
name: Emergency Stop
|
||||
icon: mdi:stop-circle
|
||||
tap_action:
|
||||
action: perform-action
|
||||
perform_action: button.press
|
||||
target:
|
||||
entity_id: button.octoprint_emergency_stop
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: button
|
||||
name: GCode Viewer
|
||||
icon: mdi:cube-outline
|
||||
tap_action:
|
||||
action: url
|
||||
url_path: https://ender5pro.duckdns.org/#gcode
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: button
|
||||
name: Pretty GCode Viewer
|
||||
icon: mdi:cube-outline
|
||||
tap_action:
|
||||
action: url
|
||||
url_path: https://ender5pro.duckdns.org/#tab_plugin_prettygcode
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Totals
|
||||
icon: mdi:chart-box-outline
|
||||
- type: tile
|
||||
entity: sensor.octoprint_printer_print_time_today
|
||||
name: Print Time Today
|
||||
icon: mdi:clock-start
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_printer_print_time_this_week
|
||||
name: Print Time This Week
|
||||
icon: mdi:calendar-week
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
grid_options:
|
||||
columns: 4
|
||||
entity: sensor.octoprint_printer_print_time_last_7_days
|
||||
name: Print Time Last 7 Days
|
||||
icon: mdi:history
|
||||
vertical: false
|
||||
features_position: bottom
|
||||
- type: tile
|
||||
entity: sensor.octoprint_printer_prints_today
|
||||
name: Prints Today
|
||||
icon: mdi:counter
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_printer_prints_this_week
|
||||
name: Prints This Week
|
||||
icon: mdi:counter
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_printer_prints_last_7_days
|
||||
name: Prints Last 7 Days
|
||||
icon: mdi:counter
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Filament Usage
|
||||
icon: mdi:chart-donut
|
||||
- type: tile
|
||||
entity: sensor.octoprint_last_print_filament
|
||||
name: Last Job
|
||||
icon: mdi:history
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_daily
|
||||
name: Filament Today
|
||||
icon: mdi:chart-donut
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_weekly
|
||||
name: Filament This Week
|
||||
icon: mdi:calendar-week
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_monthly
|
||||
name: Filament This Month
|
||||
icon: mdi:calendar-month
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_used_total
|
||||
name: Grand Total
|
||||
icon: mdi:chart-pie
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: heading
|
||||
heading: Grams Usage
|
||||
icon: mdi:weight
|
||||
- type: tile
|
||||
entity: sensor.octoprint_last_print_filament_weight
|
||||
name: Last Job
|
||||
icon: mdi:history
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_weight_daily
|
||||
name: Filament Today
|
||||
icon: mdi:chart-donut
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_weight_weekly
|
||||
name: Filament This Week
|
||||
icon: mdi:calendar-week
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_weight_monthly
|
||||
name: Filament This Month
|
||||
icon: mdi:calendar-month
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_used_weight_total
|
||||
name: Grand Total
|
||||
icon: mdi:chart-pie
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: heading
|
||||
heading: Cost Usage
|
||||
icon: mdi:cash-multiple
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_cost_last_job
|
||||
name: Last Job
|
||||
icon: mdi:history
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_cost_daily
|
||||
name: Cost Today
|
||||
icon: mdi:chart-donut
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_cost_weekly
|
||||
name: Cost This Week
|
||||
icon: mdi:calendar-week
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_cost_monthly
|
||||
name: Cost This Month
|
||||
icon: mdi:calendar-month
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.octoprint_filament_cost_total
|
||||
name: Grand Total
|
||||
icon: mdi:chart-pie
|
||||
grid_options:
|
||||
columns: 4
|
||||
- title: History
|
||||
path: history
|
||||
type: sections
|
||||
max_columns: 2
|
||||
sections:
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Temperature History
|
||||
icon: mdi:chart-line-variant
|
||||
- type: history-graph
|
||||
title: Temperatures (24h)
|
||||
hours_to_show: 24
|
||||
show_names: true
|
||||
expand_legend: true
|
||||
entities:
|
||||
- entity: sensor.octoprint_tool_0_temperature
|
||||
name: Nozzle
|
||||
color: '#ef5350'
|
||||
- entity: sensor.octoprint_tool_0_target
|
||||
name: Nozzle Target
|
||||
color: '#ffab91'
|
||||
- entity: sensor.octoprint_bed_temperature
|
||||
name: Bed
|
||||
color: '#42a5f5'
|
||||
- entity: sensor.octoprint_bed_target
|
||||
name: Bed Target
|
||||
color: '#90caf9'
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: history-graph
|
||||
title: Temperatures (7 days)
|
||||
hours_to_show: 168
|
||||
show_names: true
|
||||
expand_legend: true
|
||||
entities:
|
||||
- entity: sensor.octoprint_tool_0_temperature
|
||||
name: Nozzle
|
||||
color: '#ef5350'
|
||||
- entity: sensor.octoprint_bed_temperature
|
||||
name: Bed
|
||||
color: '#42a5f5'
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Print Activity
|
||||
icon: mdi:chart-box-outline
|
||||
- type: custom:apexcharts-card
|
||||
header:
|
||||
show: true
|
||||
title: Z Position (24h)
|
||||
show_states: true
|
||||
colorize_states: true
|
||||
graph_span: 24h
|
||||
series:
|
||||
- entity: sensor.octoprint_current_z
|
||||
name: Current Z
|
||||
color: '#ab47bc'
|
||||
type: line
|
||||
curve: straight
|
||||
fill_raw: last
|
||||
grid_options:
|
||||
columns: full
|
||||
apex_config:
|
||||
chart:
|
||||
height: 300
|
||||
stroke:
|
||||
width: 1
|
||||
- type: history-graph
|
||||
title: Print Progress (24h)
|
||||
hours_to_show: 24
|
||||
show_names: true
|
||||
entities:
|
||||
- entity: sensor.octoprint_print_progress_live
|
||||
name: Progress
|
||||
color: '#66bb6a'
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: history-graph
|
||||
title: Print Duration (24h)
|
||||
hours_to_show: 24
|
||||
show_names: true
|
||||
entities:
|
||||
- entity: sensor.octoprint_elapsed
|
||||
name: Elapsed
|
||||
color: '#26c6da'
|
||||
- entity: sensor.octoprint_time_left
|
||||
name: Remaining
|
||||
color: '#ffa726'
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Print History
|
||||
icon: mdi:history
|
||||
- type: markdown
|
||||
content: '**Successful:** {{ states(''sensor.octoprint_successful_prints_count'')
|
||||
}} | **Failed:** {{ states(''sensor.octoprint_failed_prints_count'') }}'
|
||||
- type: history-graph
|
||||
title: Printing State (7 days)
|
||||
hours_to_show: 168
|
||||
show_names: true
|
||||
entities:
|
||||
- entity: binary_sensor.octoprint_printing
|
||||
name: Printing
|
||||
color: '#66bb6a'
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: custom:apexcharts-card
|
||||
header:
|
||||
show: true
|
||||
title: Print Outcomes (30 days)
|
||||
show_states: true
|
||||
colorize_states: true
|
||||
graph_span: 30d
|
||||
apex_config:
|
||||
chart:
|
||||
type: bar
|
||||
stacked: true
|
||||
height: 300
|
||||
plotOptions:
|
||||
bar:
|
||||
columnWidth: 50%
|
||||
dataLabels:
|
||||
enabled: true
|
||||
yaxis:
|
||||
tickAmount: 4
|
||||
labels:
|
||||
minWidth: 40
|
||||
legend:
|
||||
show: true
|
||||
series:
|
||||
- entity: sensor.octoprint_successful_prints_count
|
||||
name: Successful
|
||||
color: '#66bb6a'
|
||||
type: column
|
||||
group_by:
|
||||
func: diff
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
- entity: sensor.octoprint_failed_prints_count
|
||||
name: Failed
|
||||
color: '#ef5350'
|
||||
type: column
|
||||
group_by:
|
||||
func: diff
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
grid_options:
|
||||
columns: full
|
||||
span:
|
||||
end: day
|
||||
- type: markdown
|
||||
title: Recent Prints
|
||||
content: "{% for j in (state_attr('sensor.octoprint_recent_prints', 'allPrintJobs')\
|
||||
\ | default([]))[:5] %}\n{% set d = j.get('duration', 0) | int %}\n- **{{\
|
||||
\ j.fileName }}** \u2014 {{ j.printStatusResult | title }}, {{ (d / 3600)\
|
||||
\ | int }}h {{ ((d % 3600) / 60) | int }}m, {{ j.get('filamentModels', {}).get('total',\
|
||||
\ {}).get('usedLength', 0) | round(0) }}mm\n{% endfor %}"
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Filament Usage
|
||||
icon: mdi:spool
|
||||
- type: custom:apexcharts-card
|
||||
header:
|
||||
show: true
|
||||
title: Filament Usage (30 days)
|
||||
show_states: true
|
||||
colorize_states: true
|
||||
graph_span: 30d
|
||||
apex_config:
|
||||
chart:
|
||||
type: bar
|
||||
height: 300
|
||||
plotOptions:
|
||||
bar:
|
||||
columnWidth: 50%
|
||||
dataLabels:
|
||||
enabled: false
|
||||
yaxis:
|
||||
tickAmount: 4
|
||||
labels:
|
||||
minWidth: 40
|
||||
series:
|
||||
- entity: sensor.octoprint_filament_daily
|
||||
name: Used (mm)
|
||||
color: '#26c6da'
|
||||
type: column
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
- entity: sensor.octoprint_filament_used_total
|
||||
name: Total (mm)
|
||||
color: '#ab47bc'
|
||||
type: line
|
||||
curve: straight
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
- entity: sensor.octoprint_filament_weekly
|
||||
name: Weekly (mm)
|
||||
color: '#ffca28'
|
||||
type: column
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
grid_options:
|
||||
columns: full
|
||||
span:
|
||||
end: day
|
||||
- type: custom:apexcharts-card
|
||||
header:
|
||||
show: true
|
||||
title: Filament Usage - Grams (30 days)
|
||||
show_states: true
|
||||
colorize_states: true
|
||||
graph_span: 30d
|
||||
apex_config:
|
||||
chart:
|
||||
type: bar
|
||||
height: 300
|
||||
plotOptions:
|
||||
bar:
|
||||
columnWidth: 50%
|
||||
dataLabels:
|
||||
enabled: false
|
||||
yaxis:
|
||||
tickAmount: 4
|
||||
labels:
|
||||
minWidth: 40
|
||||
series:
|
||||
- entity: sensor.octoprint_filament_weight_daily
|
||||
name: Used (g)
|
||||
color: '#26c6da'
|
||||
type: column
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
- entity: sensor.octoprint_filament_used_weight_total
|
||||
name: Total (g)
|
||||
color: '#ab47bc'
|
||||
type: line
|
||||
curve: straight
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
- entity: sensor.octoprint_filament_weight_weekly
|
||||
name: Weekly (g)
|
||||
color: '#ffca28'
|
||||
type: column
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
grid_options:
|
||||
columns: full
|
||||
span:
|
||||
end: day
|
||||
- type: custom:apexcharts-card
|
||||
header:
|
||||
show: true
|
||||
title: Filament Usage - Cost (30 days)
|
||||
show_states: true
|
||||
colorize_states: true
|
||||
graph_span: 30d
|
||||
apex_config:
|
||||
chart:
|
||||
type: bar
|
||||
height: 300
|
||||
plotOptions:
|
||||
bar:
|
||||
columnWidth: 50%
|
||||
dataLabels:
|
||||
enabled: false
|
||||
yaxis:
|
||||
tickAmount: 4
|
||||
labels:
|
||||
minWidth: 40
|
||||
series:
|
||||
- entity: sensor.octoprint_filament_cost_daily
|
||||
name: Used ($)
|
||||
color: '#26c6da'
|
||||
type: column
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
- entity: sensor.octoprint_filament_cost_weekly
|
||||
name: Weekly ($)
|
||||
color: '#ffca28'
|
||||
type: column
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
- entity: sensor.octoprint_filament_cost_total
|
||||
name: Total ($)
|
||||
color: '#ab47bc'
|
||||
type: line
|
||||
curve: straight
|
||||
group_by:
|
||||
func: last
|
||||
duration: 1d
|
||||
start_with_last: true
|
||||
grid_options:
|
||||
columns: full
|
||||
span:
|
||||
end: day
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: OctoPrint Host
|
||||
icon: mdi:server
|
||||
- type: tile
|
||||
entity: sensor.octoprint_disk_usage
|
||||
icon: mdi:harddisk
|
||||
- type: tile
|
||||
entity: sensor.octoprint_cpu_usage
|
||||
icon: mdi:cpu-64-bit
|
||||
- type: tile
|
||||
entity: sensor.octoprint_memory_usage
|
||||
icon: mdi:memory
|
||||
- type: tile
|
||||
entity: sensor.octoprint_core_0_temperature
|
||||
icon: mdi:thermometer
|
||||
- type: tile
|
||||
entity: sensor.octoprint_uptime
|
||||
icon: mdi:clock-outline
|
||||
- type: sections
|
||||
max_columns: 4
|
||||
title: Test
|
||||
path: test
|
||||
sections:
|
||||
- type: grid
|
||||
cards:
|
||||
- type: custom:mushroom-title-card
|
||||
title: "Moonraker \u2013 {{ states('sensor.sparkx_moonraker_current_display_message')\
|
||||
\ }}"
|
||||
subtitle: '{{ states(''sensor.sparkx_moonraker_filename'') }}'
|
||||
alignment: center
|
||||
title_tap_action:
|
||||
action: url
|
||||
url_path: http://moonraker.local/
|
||||
- type: tile
|
||||
entity: sensor.sparkx_moonraker_current_print_state
|
||||
name: Status
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.sparkx_moonraker_print_duration
|
||||
name: Elapsed
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.sparkx_moonraker_print_eta
|
||||
name: Completion
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.sparkx_moonraker_progress
|
||||
name: Print Progress
|
||||
icon: mdi:clock-end
|
||||
features:
|
||||
- type: bar-gauge
|
||||
min: 0
|
||||
max: 100
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Controls
|
||||
icon: mdi:gesture-tap-button
|
||||
- type: grid
|
||||
columns: 4
|
||||
square: false
|
||||
cards:
|
||||
- type: custom:button-card
|
||||
entity: button.sparkx_moonraker_pause_print
|
||||
color_type: icon
|
||||
tap_action:
|
||||
action: toggle
|
||||
name: Pause
|
||||
- type: custom:button-card
|
||||
entity: button.sparkx_moonraker_resume_print
|
||||
color_type: icon
|
||||
tap_action:
|
||||
action: toggle
|
||||
name: Resume
|
||||
- type: custom:button-card
|
||||
entity: button.sparkx_moonraker_cancel_print
|
||||
color_type: icon
|
||||
tap_action:
|
||||
action: toggle
|
||||
name: Cancel
|
||||
lock:
|
||||
enabled: false
|
||||
confirmation:
|
||||
text: This will CANCEL the print. Are you sure?
|
||||
- type: custom:button-card
|
||||
entity: button.sparkx_moonraker_emergency_stop
|
||||
color_type: icon
|
||||
color: red
|
||||
tap_action:
|
||||
action: toggle
|
||||
name: Emergency
|
||||
lock:
|
||||
enabled: false
|
||||
confirmation:
|
||||
text: This will REBOOT the printer. Are you sure?
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Printer Temperatures
|
||||
icon: mdi:thermometer
|
||||
- type: custom:apexcharts-card
|
||||
graph_span: 1h
|
||||
header:
|
||||
show: true
|
||||
title: Printer Temperatures
|
||||
show_states: true
|
||||
colorize_states: true
|
||||
apex_config:
|
||||
chart:
|
||||
height: 200
|
||||
legend:
|
||||
show: false
|
||||
grid:
|
||||
xaxis:
|
||||
lines:
|
||||
show: true
|
||||
borderColor: '#555'
|
||||
yaxis:
|
||||
- opposite: true
|
||||
decimals: 0
|
||||
tickAmount: 2
|
||||
all_series_config:
|
||||
stroke_width: 2
|
||||
float_precision: 0
|
||||
show:
|
||||
name_in_header: true
|
||||
series:
|
||||
- entity: sensor.sparkx_moonraker_extruder_temperature
|
||||
name: Hotend
|
||||
- entity: sensor.sparkx_moonraker_bed_temperature
|
||||
name: Bed
|
||||
- entity: sensor.sparkx_moonraker_mcu_temp
|
||||
name: MCU
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Fan Speeds
|
||||
icon: mdi:fan
|
||||
- type: custom:apexcharts-card
|
||||
graph_span: 1h
|
||||
header:
|
||||
show: true
|
||||
title: Fan Speeds
|
||||
show_states: true
|
||||
colorize_states: true
|
||||
apex_config:
|
||||
chart:
|
||||
height: 200
|
||||
legend:
|
||||
show: false
|
||||
grid:
|
||||
xaxis:
|
||||
lines:
|
||||
show: true
|
||||
borderColor: '#555'
|
||||
yaxis:
|
||||
- opposite: true
|
||||
decimals: 0
|
||||
tickAmount: 2
|
||||
all_series_config:
|
||||
stroke_width: 2
|
||||
show:
|
||||
name_in_header: true
|
||||
series:
|
||||
- entity: sensor.sparkx_moonraker_hotend_fan
|
||||
name: Hotend
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Camera
|
||||
icon: mdi:camera
|
||||
- type: conditional
|
||||
conditions:
|
||||
- entity: sensor.sparkx_moonraker_current_print_state
|
||||
state_not: unavailable
|
||||
card:
|
||||
type: picture-entity
|
||||
entity: camera.sparkx_moonraker_back
|
||||
camera_view: live
|
||||
show_name: false
|
||||
show_state: false
|
||||
aspect_ratio: 4x3
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: conditional
|
||||
conditions:
|
||||
- entity: sensor.sparkx_moonraker_current_print_state
|
||||
state_not: unavailable
|
||||
card:
|
||||
type: picture-entity
|
||||
entity: camera.sparkx_moonraker_thumbnail
|
||||
camera_view: auto
|
||||
show_name: false
|
||||
show_state: false
|
||||
grid_options:
|
||||
columns: 6
|
||||
@@ -0,0 +1,328 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: sparkx-i7
|
||||
captured: '2026-09-24T01:53:57.178530+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- max_columns: 4
|
||||
path: print
|
||||
sections:
|
||||
- cards:
|
||||
- heading: Printer Status
|
||||
icon: mdi:printer-3d-nozzle
|
||||
type: heading
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint2
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: creality_k2_192_168_1_233
|
||||
- entity: sensor.sparkx_i7_print_status
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:state-machine
|
||||
name: Status
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_position_z
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:axis-z-arrow
|
||||
name: Current Z
|
||||
type: tile
|
||||
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
|
||||
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
|
||||
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
|
||||
type: grid
|
||||
title: Print
|
||||
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
|
||||
@@ -0,0 +1,332 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: sparkx-i7
|
||||
captured: '2026-09-24T01:55:13.613039+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- max_columns: 4
|
||||
path: print
|
||||
sections:
|
||||
- cards:
|
||||
- heading: Printer Status
|
||||
icon: mdi:printer-3d-nozzle
|
||||
type: heading
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint
|
||||
- show_state: true
|
||||
show_name: true
|
||||
camera_view: live
|
||||
fit_mode: cover
|
||||
type: picture-entity
|
||||
entity: camera.sparkx_i7_printer_camera
|
||||
camera_image: camera.sparkx_i7_printer_camera
|
||||
grid_options:
|
||||
columns: full
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: creality_k2_192_168_1_233
|
||||
- entity: sensor.sparkx_i7_print_status
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:state-machine
|
||||
name: Status
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_position_z
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:axis-z-arrow
|
||||
name: Current Z
|
||||
type: tile
|
||||
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
|
||||
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
|
||||
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
|
||||
type: grid
|
||||
title: Print
|
||||
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
|
||||
@@ -0,0 +1,341 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: sparkx-i7
|
||||
captured: '2026-09-24T01:56:14.808635+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- max_columns: 4
|
||||
path: print
|
||||
sections:
|
||||
- cards:
|
||||
- heading: Printer Status
|
||||
icon: mdi:printer-3d-nozzle
|
||||
type: heading
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint2
|
||||
- show_state: true
|
||||
show_name: true
|
||||
camera_view: live
|
||||
fit_mode: cover
|
||||
type: picture-entity
|
||||
entity: camera.sparkx_i7_printer_camera
|
||||
camera_image: camera.sparkx_i7_printer_camera
|
||||
grid_options:
|
||||
columns: full
|
||||
- show_state: true
|
||||
show_name: true
|
||||
camera_view: live
|
||||
fit_mode: cover
|
||||
type: picture-entity
|
||||
entity: camera.sparkx_i7_printer_camera
|
||||
camera_image: camera.sparkx_i7_printer_camera
|
||||
grid_options:
|
||||
columns: full
|
||||
- entity: sensor.sparkx_i7_print_status
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:state-machine
|
||||
name: Status
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_position_z
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:axis-z-arrow
|
||||
name: Current Z
|
||||
type: tile
|
||||
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
|
||||
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
|
||||
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
|
||||
type: grid
|
||||
title: Print
|
||||
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
|
||||
@@ -0,0 +1,332 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: sparkx-i7
|
||||
captured: '2026-09-24T02:37:41.746451+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- max_columns: 4
|
||||
path: print
|
||||
sections:
|
||||
- cards:
|
||||
- heading: Printer Status
|
||||
icon: mdi:printer-3d-nozzle
|
||||
type: heading
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint2
|
||||
- show_state: true
|
||||
show_name: true
|
||||
camera_view: live
|
||||
fit_mode: cover
|
||||
type: picture-entity
|
||||
entity: camera.sparkx_i7_printer_camera
|
||||
camera_image: camera.sparkx_i7_printer_camera
|
||||
grid_options:
|
||||
columns: full
|
||||
- entity: sensor.sparkx_i7_print_status
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:state-machine
|
||||
name: Status
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_position_z
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:axis-z-arrow
|
||||
name: Current Z
|
||||
type: tile
|
||||
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
|
||||
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
|
||||
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
|
||||
type: grid
|
||||
title: Print
|
||||
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
|
||||
@@ -0,0 +1,380 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: sparkx-i7
|
||||
captured: '2026-09-24T02:37:46.568526+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- max_columns: 4
|
||||
path: print
|
||||
sections:
|
||||
- cards:
|
||||
- heading: Printer Status
|
||||
icon: mdi:printer-3d-nozzle
|
||||
type: heading
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint2
|
||||
- show_state: true
|
||||
show_name: true
|
||||
camera_view: live
|
||||
fit_mode: cover
|
||||
type: picture-entity
|
||||
entity: camera.sparkx_i7_printer_camera
|
||||
camera_image: camera.sparkx_i7_printer_camera
|
||||
grid_options:
|
||||
columns: full
|
||||
- entity: sensor.sparkx_i7_print_status
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:state-machine
|
||||
name: Status
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_position_z
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:axis-z-arrow
|
||||
name: Current Z
|
||||
type: tile
|
||||
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
|
||||
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
|
||||
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
|
||||
type: grid
|
||||
- cards:
|
||||
- heading: Filament
|
||||
icon: mdi:printer-3d-nozzle-outline
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 3
|
||||
max: 100
|
||||
min: 0
|
||||
name: Filament Used
|
||||
severity:
|
||||
green: 0
|
||||
red: 100
|
||||
yellow: 60
|
||||
type: gauge
|
||||
unit: g
|
||||
- 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_filament_cost
|
||||
grid_options:
|
||||
columns: 3
|
||||
icon: mdi:cash
|
||||
name: Cost (total)
|
||||
type: tile
|
||||
- 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
|
||||
- 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
|
||||
@@ -0,0 +1,392 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: sparkx-i7
|
||||
captured: '2026-09-24T02:38:09.546522+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- max_columns: 4
|
||||
path: print
|
||||
sections:
|
||||
- cards:
|
||||
- heading: Printer Status
|
||||
icon: mdi:printer-3d-nozzle
|
||||
type: heading
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint2
|
||||
- show_state: true
|
||||
show_name: true
|
||||
camera_view: live
|
||||
fit_mode: cover
|
||||
type: picture-entity
|
||||
entity: camera.sparkx_i7_printer_camera
|
||||
camera_image: camera.sparkx_i7_printer_camera
|
||||
grid_options:
|
||||
columns: full
|
||||
- entity: sensor.sparkx_i7_print_status
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:state-machine
|
||||
name: Status
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_position_z
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:axis-z-arrow
|
||||
name: Current Z
|
||||
type: tile
|
||||
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
|
||||
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: sensor.sparkx_i7_chamber_temperature
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 100
|
||||
min: 0
|
||||
name: Chamber
|
||||
severity:
|
||||
green: 0
|
||||
red: 70
|
||||
yellow: 45
|
||||
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
|
||||
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
|
||||
type: grid
|
||||
- cards:
|
||||
- heading: Filament
|
||||
icon: mdi:printer-3d-nozzle-outline
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 3
|
||||
max: 100
|
||||
min: 0
|
||||
name: Filament Used
|
||||
severity:
|
||||
green: 0
|
||||
red: 100
|
||||
yellow: 60
|
||||
type: gauge
|
||||
unit: g
|
||||
- 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_filament_cost
|
||||
grid_options:
|
||||
columns: 3
|
||||
icon: mdi:cash
|
||||
name: Cost (total)
|
||||
type: tile
|
||||
- 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
|
||||
- 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
|
||||
@@ -0,0 +1,505 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: sparkx-i7
|
||||
captured: '2026-09-24T02:45:12.119555+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- max_columns: 4
|
||||
path: print
|
||||
sections:
|
||||
- cards:
|
||||
- heading: Printer Status
|
||||
icon: mdi:printer-3d-nozzle
|
||||
type: heading
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint2
|
||||
- show_state: true
|
||||
show_name: true
|
||||
camera_view: live
|
||||
fit_mode: cover
|
||||
type: picture-entity
|
||||
entity: camera.sparkx_i7_printer_camera
|
||||
camera_image: camera.sparkx_i7_printer_camera
|
||||
grid_options:
|
||||
columns: full
|
||||
- entity: sensor.sparkx_i7_print_status
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:state-machine
|
||||
name: Status
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_position_z
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:axis-z-arrow
|
||||
name: Current Z
|
||||
type: tile
|
||||
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
|
||||
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: sensor.sparkx_i7_chamber_temperature
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 100
|
||||
min: 0
|
||||
name: Chamber
|
||||
severity:
|
||||
green: 0
|
||||
red: 70
|
||||
yellow: 45
|
||||
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
|
||||
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
|
||||
type: grid
|
||||
- cards:
|
||||
- heading: Filament
|
||||
icon: mdi:printer-3d-nozzle-outline
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 3
|
||||
max: 100
|
||||
min: 0
|
||||
name: Filament Used
|
||||
severity:
|
||||
green: 0
|
||||
red: 100
|
||||
yellow: 60
|
||||
type: gauge
|
||||
unit: g
|
||||
- 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_filament_cost
|
||||
grid_options:
|
||||
columns: 3
|
||||
icon: mdi:cash
|
||||
name: Cost (total)
|
||||
type: tile
|
||||
- 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
|
||||
- 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
|
||||
- title: CFS / Fans
|
||||
path: cfs-fans
|
||||
type: sections
|
||||
icon: mdi:printer-3d-nozzle-outline
|
||||
max_columns: 4
|
||||
sections:
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: CFS Box 1
|
||||
icon: mdi:file-cabinet
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
name: Temperature
|
||||
icon: mdi:thermometer
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
name: Humidity
|
||||
icon: mdi:water-percent
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 1
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_1_filament'') }}'
|
||||
secondary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_1_remaining'') }}%
|
||||
left'
|
||||
multiline_secondary: true
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 2
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_2_filament'') }}'
|
||||
secondary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_2_remaining'') }}%
|
||||
left'
|
||||
multiline_secondary: true
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 3
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_3_filament'') }}'
|
||||
secondary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_3_remaining'') }}%
|
||||
left'
|
||||
multiline_secondary: true
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 4
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_4_filament'') }}'
|
||||
secondary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_4_remaining'') }}%
|
||||
left'
|
||||
multiline_secondary: true
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: External / Active
|
||||
icon: mdi:printer-3d
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_active_filament_slot
|
||||
name: Active Slot
|
||||
icon: mdi:swap-horizontal
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:lan-outline
|
||||
name: External Filament
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_external_filament'') }}'
|
||||
secondary: '{{ states(''sensor.sparkx_i7_cfs_external_remaining'') }}% left'
|
||||
multiline_secondary: true
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_filament_status
|
||||
name: Filament Status
|
||||
icon: mdi:printer-3d-nozzle-alert
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Fans
|
||||
icon: mdi:fan
|
||||
- type: tile
|
||||
entity: fan.sparkx_i7_model_fan
|
||||
name: Model Fan
|
||||
icon: mdi:fan
|
||||
features:
|
||||
- type: fan-speed
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: fan.sparkx_i7_case_fan
|
||||
name: Case Fan
|
||||
icon: mdi:fan
|
||||
features:
|
||||
- type: fan-speed
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: fan.sparkx_i7_side_fan
|
||||
name: Side Fan
|
||||
icon: mdi:fan
|
||||
features:
|
||||
- type: fan-speed
|
||||
grid_options:
|
||||
columns: 4
|
||||
@@ -0,0 +1,582 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: sparkx-i7
|
||||
captured: '2026-09-24T02:45:25.739434+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- max_columns: 4
|
||||
path: print
|
||||
sections:
|
||||
- cards:
|
||||
- heading: Printer Status
|
||||
icon: mdi:printer-3d-nozzle
|
||||
type: heading
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint2
|
||||
- show_state: true
|
||||
show_name: true
|
||||
camera_view: live
|
||||
fit_mode: cover
|
||||
type: picture-entity
|
||||
entity: camera.sparkx_i7_printer_camera
|
||||
camera_image: camera.sparkx_i7_printer_camera
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: picture
|
||||
image_entity: image.sparkx_i7_current_print_preview
|
||||
show_name: false
|
||||
grid_options:
|
||||
columns: full
|
||||
- entity: sensor.sparkx_i7_print_status
|
||||
grid_options:
|
||||
columns: 12
|
||||
icon: mdi:state-machine
|
||||
name: Status
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_position_z
|
||||
grid_options:
|
||||
columns: 4
|
||||
icon: mdi:axis-z-arrow
|
||||
name: Current Z
|
||||
type: tile
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_position_x
|
||||
name: X
|
||||
icon: mdi:axis-x-arrow
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_position_y
|
||||
name: Y
|
||||
icon: mdi:axis-y-arrow
|
||||
grid_options:
|
||||
columns: 4
|
||||
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
|
||||
- type: tile
|
||||
entity: number.sparkx_i7_print_tuning
|
||||
name: Print Tuning
|
||||
icon: mdi:speedometer
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_print_speed
|
||||
name: Speed
|
||||
icon: mdi:speedometer
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_real_time_flow
|
||||
name: Real-Time Flow
|
||||
icon: mdi:cube-send
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_current_object
|
||||
name: Object
|
||||
icon: mdi:cube-outline
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_object_count
|
||||
name: Object Count
|
||||
icon: mdi:counter
|
||||
grid_options:
|
||||
columns: 6
|
||||
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: sensor.sparkx_i7_chamber_temperature
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 100
|
||||
min: 0
|
||||
name: Chamber
|
||||
severity:
|
||||
green: 0
|
||||
red: 70
|
||||
yellow: 45
|
||||
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
|
||||
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
|
||||
- type: tile
|
||||
entity: button.sparkx_i7_home_xy_then_z
|
||||
name: Home
|
||||
icon: mdi:home-circle
|
||||
grid_options:
|
||||
columns: 4
|
||||
tap_action:
|
||||
action: perform-action
|
||||
perform_action: button.press
|
||||
target:
|
||||
entity_id: button.sparkx_i7_home_xy_then_z
|
||||
type: grid
|
||||
- cards:
|
||||
- heading: Filament
|
||||
icon: mdi:printer-3d-nozzle-outline
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 3
|
||||
max: 100
|
||||
min: 0
|
||||
name: Filament Used
|
||||
severity:
|
||||
green: 0
|
||||
red: 100
|
||||
yellow: 60
|
||||
type: gauge
|
||||
unit: g
|
||||
- entity: input_number.sparkx_i7_filament_g_cm
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:weight-kilogram
|
||||
name: g/cm
|
||||
type: tile
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_used_material_length
|
||||
name: Used Length
|
||||
icon: mdi:counter
|
||||
grid_options:
|
||||
columns: 6
|
||||
- entity: sensor.sparkx_i7_filament_cost
|
||||
grid_options:
|
||||
columns: 3
|
||||
icon: mdi:cash
|
||||
name: Cost (total)
|
||||
type: tile
|
||||
- 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
|
||||
- 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
|
||||
- title: CFS / Fans
|
||||
path: cfs-fans
|
||||
type: sections
|
||||
icon: mdi:printer-3d-nozzle-outline
|
||||
max_columns: 4
|
||||
sections:
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: CFS Box 1
|
||||
icon: mdi:file-cabinet
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
name: Temperature
|
||||
icon: mdi:thermometer
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
name: Humidity
|
||||
icon: mdi:water-percent
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon_color: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_1_color'') }}'
|
||||
secondary: "{% set col = states('sensor.sparkx_i7_cfs_box_1_slot_1_color')\
|
||||
\ %}{% if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_1_remaining')\
|
||||
\ }}% left"
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 1
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_1_filament'') }}'
|
||||
secondary: "{% set col = states('sensor.sparkx_i7_cfs_box_1_slot_2_color')\
|
||||
\ %}{% if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_2_remaining')\
|
||||
\ }}% left"
|
||||
multiline_secondary: true
|
||||
icon_color: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_2_color'') }}'
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 2
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_2_filament'') }}'
|
||||
secondary: "{% set col = states('sensor.sparkx_i7_cfs_box_1_slot_3_color')\
|
||||
\ %}{% if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_3_remaining')\
|
||||
\ }}% left"
|
||||
multiline_secondary: true
|
||||
icon_color: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_3_color'') }}'
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 3
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_3_filament'') }}'
|
||||
secondary: "{% set col = states('sensor.sparkx_i7_cfs_box_1_slot_4_color')\
|
||||
\ %}{% if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_4_remaining')\
|
||||
\ }}% left"
|
||||
multiline_secondary: true
|
||||
icon_color: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_4_color'') }}'
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 4
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_4_filament'') }}'
|
||||
secondary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_4_remaining'') }}%
|
||||
left'
|
||||
multiline_secondary: true
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: External / Active
|
||||
icon: mdi:printer-3d
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_active_filament_slot
|
||||
name: Active Slot
|
||||
icon: mdi:swap-horizontal
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:lan-outline
|
||||
name: External Filament
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_external_filament'') }}'
|
||||
secondary: "{% set col = states('sensor.sparkx_i7_cfs_external_color') %}{%\
|
||||
\ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_external_remaining')\
|
||||
\ }}% left"
|
||||
multiline_secondary: true
|
||||
icon_color: '{{ states(''sensor.sparkx_i7_cfs_external_color'') }}'
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_filament_status
|
||||
name: Filament Status
|
||||
icon: mdi:printer-3d-nozzle-alert
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Fans
|
||||
icon: mdi:fan
|
||||
- type: tile
|
||||
entity: fan.sparkx_i7_model_fan
|
||||
name: Model Fan
|
||||
icon: mdi:fan
|
||||
features:
|
||||
- type: fan-speed
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: fan.sparkx_i7_case_fan
|
||||
name: Case Fan
|
||||
icon: mdi:fan
|
||||
features:
|
||||
- type: fan-speed
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: fan.sparkx_i7_side_fan
|
||||
name: Side Fan
|
||||
icon: mdi:fan
|
||||
features:
|
||||
- type: fan-speed
|
||||
grid_options:
|
||||
columns: 4
|
||||
@@ -0,0 +1,582 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: sparkx-i7
|
||||
captured: '2026-09-24T02:45:32.515465+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- max_columns: 4
|
||||
path: print
|
||||
sections:
|
||||
- cards:
|
||||
- heading: Printer Status
|
||||
icon: mdi:printer-3d-nozzle
|
||||
type: heading
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint2
|
||||
- show_state: true
|
||||
show_name: true
|
||||
camera_view: live
|
||||
fit_mode: cover
|
||||
type: picture-entity
|
||||
entity: camera.sparkx_i7_printer_camera
|
||||
camera_image: camera.sparkx_i7_printer_camera
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: picture
|
||||
image_entity: image.sparkx_i7_current_print_preview
|
||||
show_name: false
|
||||
grid_options:
|
||||
columns: full
|
||||
- entity: sensor.sparkx_i7_print_status
|
||||
grid_options:
|
||||
columns: 12
|
||||
icon: mdi:state-machine
|
||||
name: Status
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_position_z
|
||||
grid_options:
|
||||
columns: 4
|
||||
icon: mdi:axis-z-arrow
|
||||
name: Current Z
|
||||
type: tile
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_position_x
|
||||
name: X
|
||||
icon: mdi:axis-x-arrow
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_position_y
|
||||
name: Y
|
||||
icon: mdi:axis-y-arrow
|
||||
grid_options:
|
||||
columns: 4
|
||||
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
|
||||
- type: tile
|
||||
entity: number.sparkx_i7_print_tuning
|
||||
name: Print Tuning
|
||||
icon: mdi:speedometer
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_print_speed
|
||||
name: Speed
|
||||
icon: mdi:speedometer
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_real_time_flow
|
||||
name: Real-Time Flow
|
||||
icon: mdi:cube-send
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_current_object
|
||||
name: Object
|
||||
icon: mdi:cube-outline
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_object_count
|
||||
name: Object Count
|
||||
icon: mdi:counter
|
||||
grid_options:
|
||||
columns: 6
|
||||
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: sensor.sparkx_i7_chamber_temperature
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 100
|
||||
min: 0
|
||||
name: Chamber
|
||||
severity:
|
||||
green: 0
|
||||
red: 70
|
||||
yellow: 45
|
||||
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
|
||||
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
|
||||
- type: tile
|
||||
entity: button.sparkx_i7_home_xy_then_z
|
||||
name: Home
|
||||
icon: mdi:home-circle
|
||||
grid_options:
|
||||
columns: 4
|
||||
tap_action:
|
||||
action: perform-action
|
||||
perform_action: button.press
|
||||
target:
|
||||
entity_id: button.sparkx_i7_home_xy_then_z
|
||||
type: grid
|
||||
- cards:
|
||||
- heading: Filament
|
||||
icon: mdi:printer-3d-nozzle-outline
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 3
|
||||
max: 100
|
||||
min: 0
|
||||
name: Filament Used
|
||||
severity:
|
||||
green: 0
|
||||
red: 100
|
||||
yellow: 60
|
||||
type: gauge
|
||||
unit: g
|
||||
- entity: input_number.sparkx_i7_filament_g_cm
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:weight-kilogram
|
||||
name: g/cm
|
||||
type: tile
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_used_material_length
|
||||
name: Used Length
|
||||
icon: mdi:counter
|
||||
grid_options:
|
||||
columns: 6
|
||||
- entity: sensor.sparkx_i7_filament_cost
|
||||
grid_options:
|
||||
columns: 3
|
||||
icon: mdi:cash
|
||||
name: Cost (total)
|
||||
type: tile
|
||||
- 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
|
||||
- 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
|
||||
- title: CFS / Fans
|
||||
path: cfs-fans
|
||||
type: sections
|
||||
icon: mdi:printer-3d-nozzle-outline
|
||||
max_columns: 4
|
||||
sections:
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: CFS Box 1
|
||||
icon: mdi:file-cabinet
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
name: Temperature
|
||||
icon: mdi:thermometer
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
name: Humidity
|
||||
icon: mdi:water-percent
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon_color: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_1_color'') }}'
|
||||
secondary: "{% set col = states('sensor.sparkx_i7_cfs_box_1_slot_1_color')\
|
||||
\ %}{% if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_1_remaining')\
|
||||
\ }}% left"
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 1
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_1_filament'') }}'
|
||||
secondary: "{% set col = states('sensor.sparkx_i7_cfs_box_1_slot_2_color')\
|
||||
\ %}{% if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_2_remaining')\
|
||||
\ }}% left"
|
||||
multiline_secondary: true
|
||||
icon_color: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_2_color'') }}'
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 2
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_2_filament'') }}'
|
||||
secondary: "{% set col = states('sensor.sparkx_i7_cfs_box_1_slot_3_color')\
|
||||
\ %}{% if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_3_remaining')\
|
||||
\ }}% left"
|
||||
multiline_secondary: true
|
||||
icon_color: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_3_color'') }}'
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 3
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_3_filament'') }}'
|
||||
secondary: "{% set col = states('sensor.sparkx_i7_cfs_box_1_slot_4_color')\
|
||||
\ %}{% if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_4_remaining')\
|
||||
\ }}% left"
|
||||
multiline_secondary: true
|
||||
icon_color: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_4_color'') }}'
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 4
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_4_filament'') }}'
|
||||
secondary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_4_remaining'') }}%
|
||||
left'
|
||||
multiline_secondary: true
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: External / Active
|
||||
icon: mdi:printer-3d
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_active_filament_slot
|
||||
name: Active Slot
|
||||
icon: mdi:swap-horizontal
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:lan-outline
|
||||
name: External Filament
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_external_filament'') }}'
|
||||
secondary: "{% set col = states('sensor.sparkx_i7_cfs_external_color') %}{%\
|
||||
\ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_external_remaining')\
|
||||
\ }}% left"
|
||||
multiline_secondary: true
|
||||
icon_color: '{{ states(''sensor.sparkx_i7_cfs_external_color'') }}'
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_filament_status
|
||||
name: Filament Status
|
||||
icon: mdi:printer-3d-nozzle-alert
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Fans
|
||||
icon: mdi:fan
|
||||
- type: tile
|
||||
entity: fan.sparkx_i7_model_fan
|
||||
name: Model Fan
|
||||
icon: mdi:fan
|
||||
features:
|
||||
- type: fan-speed
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: fan.sparkx_i7_case_fan
|
||||
name: Case Fan
|
||||
icon: mdi:fan
|
||||
features:
|
||||
- type: fan-speed
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: fan.sparkx_i7_side_fan
|
||||
name: Side Fan
|
||||
icon: mdi:fan
|
||||
features:
|
||||
- type: fan-speed
|
||||
grid_options:
|
||||
columns: 4
|
||||
@@ -0,0 +1,580 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: sparkx-i7
|
||||
captured: '2026-09-24T03:02:08.718310+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- max_columns: 4
|
||||
path: print
|
||||
sections:
|
||||
- cards:
|
||||
- heading: Printer Status
|
||||
icon: mdi:printer-3d-nozzle
|
||||
type: heading
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint
|
||||
- grid_options:
|
||||
columns: full
|
||||
type: custom:webrtc-camera
|
||||
ui: true
|
||||
url: octoprint2
|
||||
- show_state: true
|
||||
show_name: true
|
||||
camera_view: live
|
||||
fit_mode: cover
|
||||
type: picture-entity
|
||||
entity: camera.sparkx_i7_printer_camera
|
||||
camera_image: camera.sparkx_i7_printer_camera
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: picture
|
||||
image_entity: image.sparkx_i7_current_print_preview
|
||||
show_name: false
|
||||
grid_options:
|
||||
columns: full
|
||||
- entity: sensor.sparkx_i7_print_status
|
||||
grid_options:
|
||||
columns: 12
|
||||
icon: mdi:state-machine
|
||||
name: Status
|
||||
type: tile
|
||||
- entity: sensor.sparkx_i7_position_z
|
||||
grid_options:
|
||||
columns: 4
|
||||
icon: mdi:axis-z-arrow
|
||||
name: Current Z
|
||||
type: tile
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_position_x
|
||||
name: X
|
||||
icon: mdi:axis-x-arrow
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_position_y
|
||||
name: Y
|
||||
icon: mdi:axis-y-arrow
|
||||
grid_options:
|
||||
columns: 4
|
||||
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
|
||||
- type: tile
|
||||
entity: number.sparkx_i7_print_tuning
|
||||
name: Print Tuning
|
||||
icon: mdi:speedometer
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_print_speed
|
||||
name: Speed
|
||||
icon: mdi:speedometer
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_real_time_flow
|
||||
name: Real-Time Flow
|
||||
icon: mdi:cube-send
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_current_object
|
||||
name: Object
|
||||
icon: mdi:cube-outline
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_object_count
|
||||
name: Object Count
|
||||
icon: mdi:counter
|
||||
grid_options:
|
||||
columns: 6
|
||||
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: sensor.sparkx_i7_chamber_temperature
|
||||
grid_options:
|
||||
columns: 4
|
||||
max: 100
|
||||
min: 0
|
||||
name: Chamber
|
||||
severity:
|
||||
green: 0
|
||||
red: 70
|
||||
yellow: 45
|
||||
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
|
||||
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
|
||||
- type: tile
|
||||
entity: button.sparkx_i7_home_xy_then_z
|
||||
name: Home
|
||||
icon: mdi:home-circle
|
||||
grid_options:
|
||||
columns: 4
|
||||
tap_action:
|
||||
action: perform-action
|
||||
perform_action: button.press
|
||||
target:
|
||||
entity_id: button.sparkx_i7_home_xy_then_z
|
||||
type: grid
|
||||
- cards:
|
||||
- heading: Filament
|
||||
icon: mdi:printer-3d-nozzle-outline
|
||||
type: heading
|
||||
- entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 3
|
||||
max: 100
|
||||
min: 0
|
||||
name: Filament Used
|
||||
severity:
|
||||
green: 0
|
||||
red: 100
|
||||
yellow: 60
|
||||
type: gauge
|
||||
unit: g
|
||||
- entity: input_number.sparkx_i7_filament_g_cm
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:weight-kilogram
|
||||
name: g/cm
|
||||
type: tile
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_used_material_length
|
||||
name: Used Length
|
||||
icon: mdi:counter
|
||||
grid_options:
|
||||
columns: 6
|
||||
- entity: sensor.sparkx_i7_filament_cost
|
||||
grid_options:
|
||||
columns: 3
|
||||
icon: mdi:cash
|
||||
name: Cost (total)
|
||||
type: tile
|
||||
- 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
|
||||
- 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
|
||||
- title: CFS / Fans
|
||||
path: cfs-fans
|
||||
type: sections
|
||||
icon: mdi:printer-3d-nozzle-outline
|
||||
max_columns: 4
|
||||
sections:
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: CFS Box 1
|
||||
icon: mdi:file-cabinet
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_cfs_box_1_temperature
|
||||
name: Temperature
|
||||
icon: mdi:thermometer
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_cfs_box_1_humidity
|
||||
name: Humidity
|
||||
icon: mdi:water-percent
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 1
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_1_filament'') }}'
|
||||
secondary: "{% set col = states('sensor.sparkx_i7_cfs_box_1_slot_1_color')\
|
||||
\ %}{% if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_1_remaining')\
|
||||
\ }}% left"
|
||||
multiline_secondary: true
|
||||
icon_color: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_1_color'') }}'
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 2
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_2_filament'') }}'
|
||||
secondary: "{% set col = states('sensor.sparkx_i7_cfs_box_1_slot_2_color')\
|
||||
\ %}{% if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_2_remaining')\
|
||||
\ }}% left"
|
||||
multiline_secondary: true
|
||||
icon_color: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_2_color'') }}'
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 3
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_3_filament'') }}'
|
||||
secondary: "{% set col = states('sensor.sparkx_i7_cfs_box_1_slot_3_color')\
|
||||
\ %}{% if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_3_remaining')\
|
||||
\ }}% left"
|
||||
multiline_secondary: true
|
||||
icon_color: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_3_color'') }}'
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:printer-3d-nozzle
|
||||
name: Slot 4
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_4_filament'') }}'
|
||||
secondary: "{% set col = states('sensor.sparkx_i7_cfs_box_1_slot_4_color')\
|
||||
\ %}{% if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_4_remaining')\
|
||||
\ }}% left"
|
||||
multiline_secondary: true
|
||||
icon_color: '{{ states(''sensor.sparkx_i7_cfs_box_1_slot_4_color'') }}'
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: External / Active
|
||||
icon: mdi:printer-3d
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_active_filament_slot
|
||||
name: Active Slot
|
||||
icon: mdi:swap-horizontal
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: custom:mushroom-template-card
|
||||
grid_options:
|
||||
columns: 6
|
||||
icon: mdi:lan-outline
|
||||
name: External Filament
|
||||
primary: '{{ states(''sensor.sparkx_i7_cfs_external_filament'') }}'
|
||||
secondary: "{% set col = states('sensor.sparkx_i7_cfs_external_color') %}{%\
|
||||
\ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_external_remaining')\
|
||||
\ }}% left"
|
||||
multiline_secondary: true
|
||||
icon_color: '{{ states(''sensor.sparkx_i7_cfs_external_color'') }}'
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_filament_status
|
||||
name: Filament Status
|
||||
icon: mdi:printer-3d-nozzle-alert
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Fans
|
||||
icon: mdi:fan
|
||||
- type: tile
|
||||
entity: fan.sparkx_i7_model_fan
|
||||
name: Model Fan
|
||||
icon: mdi:fan
|
||||
features:
|
||||
- type: fan-speed
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: fan.sparkx_i7_case_fan
|
||||
name: Case Fan
|
||||
icon: mdi:fan
|
||||
features:
|
||||
- type: fan-speed
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: fan.sparkx_i7_side_fan
|
||||
name: Side Fan
|
||||
icon: mdi:fan
|
||||
features:
|
||||
- type: fan-speed
|
||||
grid_options:
|
||||
columns: 4
|
||||
@@ -0,0 +1,683 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: sparkx-i7
|
||||
captured: '2026-10-08T16:47:45.078937+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
|
||||
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
|
||||
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 %}No active job{% 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: sensor.sparkx_i7_filament_cost
|
||||
grid_options:
|
||||
columns: 3
|
||||
icon: mdi:cash
|
||||
name: Job Cost (total)
|
||||
type: tile
|
||||
- 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
|
||||
- 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
|
||||
- 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') %}{%\
|
||||
\ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_1_remaining')\
|
||||
\ }}% left"
|
||||
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') %}{%\
|
||||
\ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_2_remaining')\
|
||||
\ }}% left"
|
||||
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') %}{%\
|
||||
\ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_3_remaining')\
|
||||
\ }}% left"
|
||||
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') %}{%\
|
||||
\ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_4_remaining')\
|
||||
\ }}% left"
|
||||
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
|
||||
@@ -0,0 +1,683 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: sparkx-i7
|
||||
captured: '2026-10-08T16:48:05.400974+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
|
||||
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
|
||||
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 %}No active job{% 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: sensor.sparkx_i7_filament_cost
|
||||
grid_options:
|
||||
columns: 3
|
||||
icon: mdi:cash
|
||||
name: Job Cost (total)
|
||||
type: tile
|
||||
- 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
|
||||
- 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
|
||||
- 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') %}{%\
|
||||
\ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_1_remaining')\
|
||||
\ }}% left"
|
||||
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') %}{%\
|
||||
\ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_2_remaining')\
|
||||
\ }}% left"
|
||||
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') %}{%\
|
||||
\ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_3_remaining')\
|
||||
\ }}% left"
|
||||
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') %}{%\
|
||||
\ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_4_remaining')\
|
||||
\ }}% left"
|
||||
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
|
||||
@@ -0,0 +1,924 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: sparkx-i7
|
||||
captured: '2026-10-08T17:58:47.063357+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
|
||||
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
|
||||
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 %}No active job{% 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: sensor.sparkx_i7_filament_cost
|
||||
grid_options:
|
||||
columns: 3
|
||||
icon: mdi:cash
|
||||
name: Job Cost (total)
|
||||
type: tile
|
||||
- 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
|
||||
- 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
|
||||
- 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') %}{%\
|
||||
\ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_1_remaining')\
|
||||
\ }}% left"
|
||||
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') %}{%\
|
||||
\ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_2_remaining')\
|
||||
\ }}% left"
|
||||
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') %}{%\
|
||||
\ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_3_remaining')\
|
||||
\ }}% left"
|
||||
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') %}{%\
|
||||
\ if col %}{{ col }} \xB7 {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_4_remaining')\
|
||||
\ }}% left"
|
||||
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
|
||||
- title: Spoolman
|
||||
path: spoolman
|
||||
icon: mdi:package-variant-closed
|
||||
type: sections
|
||||
max_columns: 4
|
||||
sections:
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Overture Black ABS (Spool 1)
|
||||
icon: mdi:spool
|
||||
- type: gauge
|
||||
entity: sensor.spoolman_spool_1
|
||||
name: Remaining
|
||||
unit: g
|
||||
min: 0
|
||||
max: 1000
|
||||
severity:
|
||||
red: 0
|
||||
yellow: 300
|
||||
green: 600
|
||||
grid_options:
|
||||
columns: 6
|
||||
rows: 3
|
||||
- type: custom:mushroom-template-card
|
||||
entity: sensor.spoolman_spool_1_color_hex
|
||||
name: Color
|
||||
icon: mdi:palette
|
||||
icon_color: '{% set c = states(''sensor.spoolman_spool_1_color_hex'')|replace(''#'','''')|lower
|
||||
%}{% if c|length == 6 %}#{{ c }}{% else %}var(--primary-text-color){% endif
|
||||
%}'
|
||||
primary: '{{ states(''sensor.spoolman_spool_1_color_hex'') }}'
|
||||
secondary: "{{ states('sensor.spoolman_spool_1_filament_name') }} \xB7 {{\
|
||||
\ states('sensor.spoolman_spool_1_material') }}"
|
||||
multiline_secondary: true
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1_used_weight
|
||||
name: Used Weight
|
||||
icon: mdi:scale-balance
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1_used_percentage
|
||||
name: Used %
|
||||
icon: mdi:chart-donut
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1_remaining_length
|
||||
name: Remaining Length
|
||||
icon: mdi:ruler
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1_used_length
|
||||
name: Used Length
|
||||
icon: mdi:ruler-square
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1_spool_weight
|
||||
name: Empty Spool Weight
|
||||
icon: mdi:scale
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1_filament_weight
|
||||
name: Full Spool Weight
|
||||
icon: mdi:weight-kilogram
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1_vendor
|
||||
name: Vendor
|
||||
icon: mdi:factory
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1_material
|
||||
name: Material
|
||||
icon: mdi:layers-triple
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1_diameter
|
||||
name: Diameter
|
||||
icon: mdi:circle-outline
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1_density
|
||||
name: Density
|
||||
icon: mdi:weight-gram
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1_filament_name
|
||||
name: Filament Name
|
||||
icon: mdi:tag-outline
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: select.spoolman_spool_1_location
|
||||
name: Location
|
||||
icon: mdi:map-marker-outline
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1_estimated_runout
|
||||
name: Est. Runout
|
||||
icon: mdi:calendar-alert
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1_registered
|
||||
name: Registered
|
||||
icon: mdi:calendar-check-outline
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: binary_sensor.spoolman_spool_1_low_filament
|
||||
name: Low Filament
|
||||
icon: mdi:alert-circle-outline
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1_flow_rate
|
||||
name: Flow Rate
|
||||
icon: mdi:progress-clock
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1_id
|
||||
name: Spool ID
|
||||
icon: mdi:identifier
|
||||
grid_options:
|
||||
columns: 4
|
||||
- type: markdown
|
||||
content: "**Spoolman UI:** [http://2c829f0e-spoolman.local.hass.io:7912](http://2c829f0e-spoolman.local.hass.io:7912)\n\
|
||||
\n**Changing filaments:** 1. Set the slot color in the CFS app. 2. Create\
|
||||
\ the spool in Spoolman with a matching color hex. No Home Assistant changes\
|
||||
\ needed \u2014 new spools appear here automatically."
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Adjust Remaining
|
||||
icon: mdi:pencil-outline
|
||||
- type: entities
|
||||
title: Set value (g)
|
||||
show_header_toggle: false
|
||||
entities:
|
||||
- input_number.spoolman_set_remaining
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.spoolman_spool_1
|
||||
name: Apply to Spool 1
|
||||
icon: mdi:content-save-outline
|
||||
grid_options:
|
||||
columns: 6
|
||||
tap_action:
|
||||
action: perform-action
|
||||
perform_action: script.spoolman_set_spool_remaining
|
||||
data:
|
||||
spool_id: 1
|
||||
confirmation:
|
||||
text: Overwrite Spool 1 remaining weight in Spoolman?
|
||||
- type: markdown
|
||||
content: "1. Type the new remaining grams above. 2. Tap **Apply to Spool 1**.\
|
||||
\ The value is **absolute** \u2014 it replaces Spoolman's remaining weight,\
|
||||
\ and print deductions continue from there. Wait for a running print to\
|
||||
\ finish before adjusting."
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Print Linkage
|
||||
icon: mdi:printer-3d-nozzle
|
||||
- type: tile
|
||||
entity: input_text.sparkx_i7_print_spool_latch
|
||||
name: Latched Spool ID
|
||||
icon: mdi:link-variant
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: sensor.sparkx_i7_filament_weight_estimated
|
||||
name: Current Job Weight
|
||||
icon: mdi:weight-gram
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: automation.sparkx_i7_latch_print_spool_for_spoolman
|
||||
name: Latch Automation
|
||||
icon: mdi:link
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: tile
|
||||
entity: automation.sparkx_i7_deduct_filament_in_spoolman_on_print_complete
|
||||
name: Deduct Automation
|
||||
icon: mdi:minus-circle-outline
|
||||
grid_options:
|
||||
columns: 6
|
||||
- type: custom:mushroom-template-card
|
||||
name: Next Deduction Match
|
||||
icon: mdi:magnet
|
||||
icon_color: mdi:link
|
||||
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)|lower) == color %}{% set ns.id\
|
||||
\ = states(e[:-10] ~ '_id') %}{% endif %}{% endfor %}{% if ns.id %}Color\
|
||||
\ #{{ color }} \u2192 deducts from spool {{ ns.id }} ({% set fn = 'sensor.spoolman_spool_'\
|
||||
\ ~ ns.id ~ '_filament_name' %}{{ states(fn) }}){% elif color in ['', 'unknown',\
|
||||
\ 'unavailable'] %}Slot color unavailable{% else %}Color #{{ color }} \u2014\
|
||||
\ no matching spool{% endif %}"
|
||||
multiline_secondary: true
|
||||
grid_options:
|
||||
columns: full
|
||||
- type: grid
|
||||
cards:
|
||||
- type: heading
|
||||
heading: Spool History
|
||||
icon: mdi:history
|
||||
- type: history-graph
|
||||
title: Remaining & Used (7 days)
|
||||
hours_to_show: 168
|
||||
show_names: true
|
||||
entities:
|
||||
- entity: sensor.spoolman_spool_1
|
||||
name: Remaining
|
||||
- entity: sensor.spoolman_spool_1_used_weight
|
||||
name: Used
|
||||
grid_options:
|
||||
columns: full
|
||||
@@ -0,0 +1,15 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: dashboard
|
||||
entity_id: spoolman-ui
|
||||
captured: '2026-10-09T00:22:40.531965+00:00'
|
||||
tool: ha_config_set_dashboard
|
||||
config:
|
||||
views:
|
||||
- title: Spoolman
|
||||
path: spoolman
|
||||
type: panel
|
||||
cards:
|
||||
- type: iframe
|
||||
url: http://192.168.1.140:7912
|
||||
aspect_ratio: 100%
|
||||
@@ -0,0 +1,23 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: entity
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
captured: '2026-10-08T17:12:15.440599+00:00'
|
||||
tool: ha_set_entity
|
||||
config:
|
||||
entity_id: input_text.sparkx_i7_print_spool_latch
|
||||
state: unknown
|
||||
attributes:
|
||||
mode: text
|
||||
min: 0
|
||||
max: 100
|
||||
pattern: null
|
||||
editable: true
|
||||
friendly_name: SparkX i7 Print Spool Latch
|
||||
last_changed: '2026-10-08T16:31:30.856182+00:00'
|
||||
last_reported: '2026-10-08T16:31:30.856673+00:00'
|
||||
last_updated: '2026-10-08T16:31:30.856182+00:00'
|
||||
context:
|
||||
id: 01M4E5P2H8J5XCWZG5TCX7AHCK
|
||||
parent_id: null
|
||||
user_id: null
|
||||
@@ -0,0 +1,24 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: entity
|
||||
entity_id: input_text.total_filament_used
|
||||
captured: '2026-10-10T06:40:39.314783+00:00'
|
||||
tool: ha_set_entity
|
||||
config:
|
||||
entity_id: input_text.total_filament_used
|
||||
state: unknown
|
||||
attributes:
|
||||
mode: text
|
||||
min: 0
|
||||
max: 100
|
||||
pattern: null
|
||||
editable: true
|
||||
icon: mdi:counter
|
||||
friendly_name: Total Filament Used
|
||||
last_changed: '2026-10-10T06:40:34.866852+00:00'
|
||||
last_reported: '2026-10-10T06:40:34.867787+00:00'
|
||||
last_updated: '2026-10-10T06:40:34.866852+00:00'
|
||||
context:
|
||||
id: 01M4J8NFHJPBQD3E3BK5Y65S7Z
|
||||
parent_id: null
|
||||
user_id: null
|
||||
@@ -0,0 +1,24 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: entity
|
||||
entity_id: sensor.spoolman_filament_1
|
||||
captured: '2026-10-09T01:04:34.967384+00:00'
|
||||
tool: ha_remove_entity
|
||||
config:
|
||||
entity_id: sensor.spoolman_filament_1
|
||||
state: unavailable
|
||||
attributes:
|
||||
restored: true
|
||||
state_class: measurement
|
||||
device_class: weight
|
||||
icon: mdi:printer-3d-nozzle
|
||||
friendly_name: Filaments Overture Black ABS
|
||||
supported_features: 0
|
||||
unit_of_measurement: g
|
||||
last_changed: '2026-10-09T00:42:15.531885+00:00'
|
||||
last_reported: '2026-10-09T00:42:15.531885+00:00'
|
||||
last_updated: '2026-10-09T00:42:15.531885+00:00'
|
||||
context:
|
||||
id: 01M4F1RN3B72ZCY9YK8Y43F2CG
|
||||
parent_id: null
|
||||
user_id: null
|
||||
@@ -0,0 +1,24 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: entity
|
||||
entity_id: sensor.spoolman_filament_2
|
||||
captured: '2026-10-09T01:04:34.964180+00:00'
|
||||
tool: ha_remove_entity
|
||||
config:
|
||||
entity_id: sensor.spoolman_filament_2
|
||||
state: unavailable
|
||||
attributes:
|
||||
restored: true
|
||||
state_class: measurement
|
||||
device_class: weight
|
||||
icon: mdi:printer-3d-nozzle
|
||||
friendly_name: Filaments Generic PLA PLA
|
||||
supported_features: 0
|
||||
unit_of_measurement: g
|
||||
last_changed: '2026-10-09T00:55:34.767842+00:00'
|
||||
last_reported: '2026-10-09T00:55:34.767842+00:00'
|
||||
last_updated: '2026-10-09T00:55:34.767842+00:00'
|
||||
context:
|
||||
id: 01M4F2H1KFTKXWS3G5NHFAWH80
|
||||
parent_id: null
|
||||
user_id: null
|
||||
@@ -0,0 +1,24 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: entity
|
||||
entity_id: sensor.spoolman_filament_7
|
||||
captured: '2026-10-09T18:48:53.850639+00:00'
|
||||
tool: ha_remove_entity
|
||||
config:
|
||||
entity_id: sensor.spoolman_filament_7
|
||||
state: unavailable
|
||||
attributes:
|
||||
restored: true
|
||||
state_class: measurement
|
||||
device_class: weight
|
||||
icon: mdi:printer-3d-nozzle
|
||||
friendly_name: Filaments Black Hyper RFID PLA
|
||||
supported_features: 0
|
||||
unit_of_measurement: g
|
||||
last_changed: '2026-10-09T18:48:49.033085+00:00'
|
||||
last_reported: '2026-10-09T18:48:49.033085+00:00'
|
||||
last_updated: '2026-10-09T18:48:49.033085+00:00'
|
||||
context:
|
||||
id: 01M4GZY6M98V7PHG0YC8EQN8SE
|
||||
parent_id: null
|
||||
user_id: null
|
||||
@@ -0,0 +1,24 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: entity
|
||||
entity_id: sensor.spoolman_filament_8
|
||||
captured: '2026-10-09T18:48:53.853156+00:00'
|
||||
tool: ha_remove_entity
|
||||
config:
|
||||
entity_id: sensor.spoolman_filament_8
|
||||
state: unavailable
|
||||
attributes:
|
||||
restored: true
|
||||
state_class: measurement
|
||||
device_class: weight
|
||||
icon: mdi:printer-3d-nozzle
|
||||
friendly_name: Filaments White Hyper RFID PLA
|
||||
supported_features: 0
|
||||
unit_of_measurement: g
|
||||
last_changed: '2026-10-09T18:48:49.033206+00:00'
|
||||
last_reported: '2026-10-09T18:48:49.033206+00:00'
|
||||
last_updated: '2026-10-09T18:48:49.033206+00:00'
|
||||
context:
|
||||
id: 01M4GZY6M9XM8RXZN954T76C8X
|
||||
parent_id: null
|
||||
user_id: null
|
||||
@@ -0,0 +1,24 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: entity
|
||||
entity_id: sensor.spoolman_filament_9
|
||||
captured: '2026-10-09T18:48:53.855002+00:00'
|
||||
tool: ha_remove_entity
|
||||
config:
|
||||
entity_id: sensor.spoolman_filament_9
|
||||
state: unavailable
|
||||
attributes:
|
||||
restored: true
|
||||
state_class: measurement
|
||||
device_class: weight
|
||||
icon: mdi:printer-3d-nozzle
|
||||
friendly_name: Filaments Hyper PLA (Naval Adventures) Hyper PLA
|
||||
supported_features: 0
|
||||
unit_of_measurement: g
|
||||
last_changed: '2026-10-09T18:48:49.033339+00:00'
|
||||
last_reported: '2026-10-09T18:48:49.033339+00:00'
|
||||
last_updated: '2026-10-09T18:48:49.033339+00:00'
|
||||
context:
|
||||
id: 01M4GZY6M9D3XRZC93ZNADDB5K
|
||||
parent_id: null
|
||||
user_id: null
|
||||
@@ -0,0 +1,20 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: helper_template
|
||||
entity_id: 01M4J95V58XWWCRA3X26S6ZDN6
|
||||
captured: '2026-10-10T06:55:50.281069+00:00'
|
||||
tool: ha_config_set_helper
|
||||
config:
|
||||
entry_id: 01M4J95V58XWWCRA3X26S6ZDN6
|
||||
options:
|
||||
template_type: sensor
|
||||
name: Active Spool
|
||||
state: '{% set sid = states(''sensor.sparkx_moonraker_spool_id'') | int(0) %}{%
|
||||
if sid == 0 %}No active spool{% else %}{% set eid = ''sensor.spoolman_spool_''
|
||||
~ sid %}{{ state_attr(eid, ''friendly_name'') or (''Spool '' ~ sid) }}{% endif
|
||||
%}'
|
||||
entities:
|
||||
- entity_id: sensor.active_spool
|
||||
unique_id: 01M4J95V58XWWCRA3X26S6ZDN6
|
||||
name: null
|
||||
original_name: Active Spool
|
||||
@@ -0,0 +1,24 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: script
|
||||
entity_id: spoolman_set_spool_remaining
|
||||
captured: '2026-10-08T17:52:20.969671+00:00'
|
||||
tool: ha_config_set_script
|
||||
config:
|
||||
alias: Spoolman - Set Spool Remaining
|
||||
fields:
|
||||
spool_id:
|
||||
required: true
|
||||
name: Spool ID
|
||||
selector:
|
||||
number:
|
||||
min: 1
|
||||
max: 9999
|
||||
mode: box
|
||||
sequence:
|
||||
- action: spoolman.patch_spool
|
||||
data:
|
||||
id: '{{ spool_id | int(0) }}'
|
||||
remaining_weight: '{{ states(''input_number.spoolman_set_remaining'') | float(0)
|
||||
}}'
|
||||
mode: single
|
||||
@@ -0,0 +1,60 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: script
|
||||
entity_id: spoolman_set_spool_remaining
|
||||
captured: '2026-10-09T00:26:18.075188+00:00'
|
||||
tool: ha_config_set_script
|
||||
config:
|
||||
alias: Spoolman - Set Spool Remaining
|
||||
fields:
|
||||
slot:
|
||||
name: CFS Slot
|
||||
description: CFS slot number 1-4 - resolves the spool by the slot color hex
|
||||
selector:
|
||||
number:
|
||||
min: 1
|
||||
max: 4
|
||||
mode: box
|
||||
spool_id:
|
||||
name: Spool ID
|
||||
description: Direct Spoolman spool ID - used when no slot is given
|
||||
selector:
|
||||
number:
|
||||
min: 1
|
||||
max: 9999
|
||||
mode: box
|
||||
sequence:
|
||||
- variables:
|
||||
resolved_id: '{% set n = (slot | int(0)) if slot is defined else 0 %}{% if n
|
||||
>= 1 %}{% set color = states(''sensor.sparkx_i7_cfs_box_1_slot_'' ~ (n | int)
|
||||
~ ''_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 ns.id == ''''
|
||||
%}{% set ns.id = states(e[:-10] ~ ''_id'') %}{% endif %}{% endfor %}{{ ns.id
|
||||
}}{% else %}{{ (spool_id | int(0)) if spool_id is defined else 0 }}{% endif
|
||||
%}'
|
||||
slot_n: '{{ (slot | int(0)) if slot is defined else 0 }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ resolved_id | int(0) > 0 }}'
|
||||
sequence:
|
||||
- action: spoolman.patch_spool
|
||||
data:
|
||||
id: '{{ resolved_id | int(0) }}'
|
||||
remaining_weight: '{{ states(''input_number.spoolman_set_remaining'') |
|
||||
float(0) }}'
|
||||
default:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: Spoolman - remaining not set
|
||||
message: '{% if slot_n | int >= 1 %}No Spoolman spool matched CFS slot {{
|
||||
slot_n }} (color {{ states(''sensor.sparkx_i7_cfs_box_1_slot_'' ~ (slot_n
|
||||
| int) ~ ''_color'') }}) - register a spool with that color hex in Spoolman,
|
||||
then try again.{% else %}No spool resolved - pass spool_id or a CFS slot
|
||||
1-4. Nothing was set.{% endif %}'
|
||||
mode: single
|
||||
description: Sets a Spoolman spool remaining weight from the shared helper input_number.spoolman_set_remaining.
|
||||
Pass slot (1-4) to resolve the spool by the CFS slot color hex (no remaining-weight
|
||||
guard, so an exhausted spool can be reset to full), or pass spool_id directly.
|
||||
Notifies via persistent notification when nothing could be resolved.
|
||||
@@ -0,0 +1,60 @@
|
||||
# ha_mcp_backup
|
||||
schema_version: 1
|
||||
domain: script
|
||||
entity_id: spoolman_set_spool_remaining
|
||||
captured: '2026-10-15T13:23:53.118614+00:00'
|
||||
tool: ha_config_set_script
|
||||
config:
|
||||
alias: Spoolman - Set Spool Remaining
|
||||
fields:
|
||||
slot:
|
||||
name: CFS Slot
|
||||
description: CFS slot number 1-4 - resolves the spool by the slot color hex
|
||||
selector:
|
||||
number:
|
||||
min: 1
|
||||
max: 4
|
||||
mode: box
|
||||
spool_id:
|
||||
name: Spool ID
|
||||
description: Direct Spoolman spool ID - used when no slot is given
|
||||
selector:
|
||||
number:
|
||||
min: 1
|
||||
max: 9999
|
||||
mode: box
|
||||
sequence:
|
||||
- variables:
|
||||
resolved_id: '{% set n = (slot | int(0)) if slot is defined else 0 %}{% if n
|
||||
>= 1 %}{% 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 '' ~ (n | int)) and ns.id ==
|
||||
'''' %}{% set ns.id = states(e[:-10] ~ ''_id'') %}{% endif %}{% endfor %}{{
|
||||
ns.id }}{% else %}{{ (spool_id | int(0)) if spool_id is defined else 0 }}{%
|
||||
endif %}'
|
||||
slot_n: '{{ (slot | int(0)) if slot is defined else 0 }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
condition: template
|
||||
value_template: '{{ resolved_id | int(0) > 0 }}'
|
||||
sequence:
|
||||
- action: spoolman.patch_spool
|
||||
data:
|
||||
id: '{{ resolved_id | int(0) }}'
|
||||
remaining_weight: '{{ states(''input_number.spoolman_set_remaining'') |
|
||||
float(0) }}'
|
||||
default:
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: Spoolman - remaining not set
|
||||
message: '{% if slot_n | int >= 1 %}No Spoolman spool matched CFS slot {{
|
||||
slot_n }} (color {{ states(''sensor.sparkx_i7_cfs_box_1_slot_'' ~ (slot_n
|
||||
| int) ~ ''_color'') }}) in the CFS Lite location - register a spool with
|
||||
that color hex and location in Spoolman, then try again.{% else %}No spool
|
||||
resolved - pass spool_id or a CFS slot 1-4. Nothing was set.{% endif %}'
|
||||
mode: single
|
||||
description: Sets a Spoolman spool remaining weight from the shared helper input_number.spoolman_set_remaining.
|
||||
Pass slot (1-4) to resolve the spool by the CFS slot color hex in the CFS Lite
|
||||
location (no remaining-weight guard, so an exhausted spool can be reset to full),
|
||||
or pass spool_id directly. Notifies via persistent notification when nothing could
|
||||
be resolved.
|
||||
@@ -1 +1 @@
|
||||
{"pid": 72, "version": 1, "ha_version": "2026.8.3", "start_ts": 1788057668.905601}
|
||||
{"pid": 71, "version": 1, "ha_version": "2026.10.1", "start_ts": 1792306893.29437}
|
||||
@@ -0,0 +1,209 @@
|
||||
{
|
||||
"version": 1,
|
||||
"minor_version": 1,
|
||||
"key": "lovelace.3d_printer_cellphone",
|
||||
"data": {
|
||||
"config": {
|
||||
"views": [
|
||||
{
|
||||
"sections": [
|
||||
{
|
||||
"cards": [
|
||||
{
|
||||
"card": {
|
||||
"columns": 4,
|
||||
"square": false,
|
||||
"type": "grid"
|
||||
},
|
||||
"card_param": "cards",
|
||||
"filter": {
|
||||
"template": "{% set ns = namespace(cards=[]) %}{% set active_n = (states('sensor.sparkx_i7_active_filament_slot').split('_')[-1] | int(0)) if states('sensor.sparkx_i7_print_status') in ['printing', 'paused'] else 0 %}\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)', vendor='') %}\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 '') %}{% set v.wrap = v.wrap ~ ' active' if (n == active_n) else v.wrap %}\n {% set v.border = '#d0d0d0' if hex_clean | lower in ['#ffffff', '#fff'] else 'transparent' %}\n {% set v.html = \"<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 {% set v.vendor = (state_attr(sp.ent, 'filament_vendor_name') | default('') | string | trim) %}{% set v.label = 'Slot ' ~ n ~ (' ⚠' if band > 0 else '') %}\n {% else %}\n {% set v.html = \"<div class='tube-bg tube-empty'></div>\" %}\n {% set v.label = \"<span class='slot-warn'>Slot \" ~ n ~ \" — empty</span>\" %}\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\": \"<div class='tube-wrap\" ~ v.wrap ~ \"'>\" ~ ((\"<div class='slot-vendor'>\" ~ v.vendor ~ \"</div>\") if v.vendor else '') ~ v.html ~ \"<div class='slot-label'>\" ~ v.label ~ \"</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 {\"flex-direction\": \"column\"},\n {\"align-items\": \"center\"}\n ]\n }\n },\n \"extra_styles\": \"\n .tube-wrap.active .tube-bg { box-shadow: 0 0 10px 2px var(--primary-color); } .tube-wrap.active .slot-label { color: var(--primary-color); font-weight: 800; } .tube-wrap.active .slot-vendor { color: var(--primary-color); font-weight: 800; } .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: Line truncated
|
||||
},
|
||||
"type": "custom:auto-entities"
|
||||
},
|
||||
{
|
||||
"type": "horizontal-stack",
|
||||
"grid_options": {
|
||||
"columns": "full"
|
||||
},
|
||||
"cards": [
|
||||
{
|
||||
"type": "markdown",
|
||||
"content": "{% 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) %}{{ live | round(1) }}g{% else %}{{ (states('input_number.sparkx_i7_slot_1_grams') | float(0)) | round(1) }}g{% endif %}",
|
||||
"card_mod": {
|
||||
"style": "ha-card { background: transparent; box-shadow: none; border: none; padding: 0 4px; margin: 0; text-align: left; } .markdown { padding: 0; margin: 0; text-align: left; } p { margin: 0; padding: 0; text-align: left; font-size: 11px; line-height: 1; }"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "markdown",
|
||||
"content": "{% 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) %}{{ live | round(1) }}g{% else %}{{ (states('input_number.sparkx_i7_slot_2_grams') | float(0)) | round(1) }}g{% endif %}",
|
||||
"card_mod": {
|
||||
"style": "ha-card { background: transparent; box-shadow: none; border: none; padding: 0 4px; margin: 0; text-align: left; } .markdown { padding: 0; margin: 0; text-align: left; } p { margin: 0; padding: 0; text-align: left; font-size: 11px; line-height: 1; }"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "markdown",
|
||||
"content": "{% 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) %}{{ live | round(1) }}g{% else %}{{ (states('input_number.sparkx_i7_slot_3_grams') | float(0)) | round(1) }}g{% endif %}",
|
||||
"card_mod": {
|
||||
"style": "ha-card { background: transparent; box-shadow: none; border: none; padding: 0 4px; margin: 0; text-align: left; } .markdown { padding: 0; margin: 0; text-align: left; } p { margin: 0; padding: 0; text-align: left; font-size: 11px; line-height: 1; }"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "markdown",
|
||||
"content": "{% 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) %}{{ live | round(1) }}g{% else %}{{ (states('input_number.sparkx_i7_slot_4_grams') | float(0)) | round(1) }}g{% endif %}",
|
||||
"card_mod": {
|
||||
"style": "ha-card { background: transparent; box-shadow: none; border: none; padding: 0 4px; margin: 0; text-align: left; } .markdown { padding: 0; margin: 0; text-align: left; } p { margin: 0; padding: 0; text-align: left; font-size: 11px; line-height: 1; }"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"entity": "sensor.sparkx_i7_cfs_box_1_humidity",
|
||||
"grid_options": {
|
||||
"columns": 6
|
||||
},
|
||||
"icon": "mdi:water-percent",
|
||||
"name": "Humidity",
|
||||
"type": "tile"
|
||||
},
|
||||
{
|
||||
"entity": "sensor.sparkx_i7_cfs_box_1_temperature",
|
||||
"grid_options": {
|
||||
"columns": 6
|
||||
},
|
||||
"icon": "mdi:thermometer",
|
||||
"name": "Temperature",
|
||||
"type": "tile"
|
||||
},
|
||||
{
|
||||
"cards": [
|
||||
{
|
||||
"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') %}\n{% set n = slot.split('_')[-1] %}\n{% set ce = 'sensor.sparkx_i7_cfs_' ~ (slot | lower | replace(' ', '_')) ~ '_color' %}\n{% set color = states(ce) | replace('#', '') | lower %}\n{% set ns = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman') %}\n{% if e.endswith('_color_hex') and (state_attr(e[:-10], 'location') | default('', true) | lower) == ('cfs lite ' ~ n) and ns.id == '' %}\n{% set ns.id = states(e[:-10] ~ '_id') %}\n{% set ns.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor %}\n{% if slot in ['', 'unknown', 'unavailable'] %}No slot latched\n{% elif ns.id == '' %}No spool assigned to CFS Lite {{ n }}\n{% elif ns.rem < 0 %}Color #{{ color | upper }} → spool {{ ns.id }} unreachable\n{% elif ns.rem == 0 %}Color #{{ color | upper }} → spool {{ ns.id }} is EMPTY\n{% else %}Color #{{ color | upper }} → spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id ~ '_filament_name') }} · {{ ns.rem | round(1) }} g left)\n{% endif %}\n",
|
||||
"type": "custom:mushroom-template-card"
|
||||
}
|
||||
],
|
||||
"grid_options": {
|
||||
"columns": "full"
|
||||
},
|
||||
"type": "horizontal-stack"
|
||||
},
|
||||
{
|
||||
"heading": "Last/Current Print Job",
|
||||
"heading_style": "title",
|
||||
"icon": "mdi:printer-3d",
|
||||
"type": "heading"
|
||||
},
|
||||
{
|
||||
"entity": "sensor.sparkx_i7_used_material_length",
|
||||
"grid_options": {
|
||||
"columns": 6,
|
||||
"rows": 1
|
||||
},
|
||||
"icon": "mdi:plus-minus",
|
||||
"name": "Used Material Total",
|
||||
"type": "tile"
|
||||
},
|
||||
{
|
||||
"entity": "sensor.sparkx_moonraker_print_eta",
|
||||
"features_position": "bottom",
|
||||
"grid_options": {
|
||||
"columns": 6,
|
||||
"rows": 1
|
||||
},
|
||||
"name": "Print ETA",
|
||||
"type": "tile",
|
||||
"vertical": false
|
||||
},
|
||||
{
|
||||
"entity": "sensor.sparkx_i7_filament_weight_estimated",
|
||||
"grid_options": {
|
||||
"columns": 6,
|
||||
"rows": "auto"
|
||||
},
|
||||
"icon": "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in ['printing', 'paused'] %}\n mdi:printer-3d-nozzle\n{% else %}\n mdi:cash-multiple\n{% endif %}",
|
||||
"icon_color": "{% set st = states('sensor.sparkx_i7_print_status') %} {% if st in ['printing', 'paused'] %}\n blue\n{% else %}\n green\n{% endif %}",
|
||||
"multiline_secondary": true,
|
||||
"primary": "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set w = states('sensor.sparkx_i7_filament_weight_estimated') %}\n{% if st in ['printing', 'paused'] %}\n {% if is_number(w) %}{{ w | float | round(1) }} g{% else %}weight unavailable{% endif %}\n{% else %}\n Last: {{ states('input_number.sparkx_i7_last_job_filament_weight') | float(0) | round(1) }} g\n{% endif %}\n",
|
||||
"secondary": "{% set st = states('sensor.sparkx_i7_print_status') %}\n{% set c = states('sensor.sparkx_i7_filament_cost') %}\n{% if st in ['printing', 'paused'] %}\n {% if is_number(c) %}{{ c | float | round(2) }} $ (live){% else %}cost unavailable{% endif %}\n{% else %}\n {{ states('input_number.sparkx_i7_last_job_cost') | float(0) | round(2) }} $ (last job)\n{% endif %}\n",
|
||||
"type": "custom:mushroom-template-card"
|
||||
},
|
||||
{
|
||||
"entity": "sensor.sparkx_i7_expected_material_length",
|
||||
"grid_options": {
|
||||
"columns": 6,
|
||||
"rows": "auto"
|
||||
},
|
||||
"icon": "mdi:scale-balance",
|
||||
"icon_color": "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length') | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight') | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length') | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color') | default('', true) | string).split(';') %}\n{% set q = p | replace('#','') | lower | trim %}\n{% if q not in ['','none','unknown','unavailable'] %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot') | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false, ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman') if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location') | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10] %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status') | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown', label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle' %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{% elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH' %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough' %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'ok' %}green{% elif v.state == 'short' %}red{% elif v.state in ['none','idle'] %}grey{% else %}orange{% endif %}",
|
||||
"multiline_secondary": true,
|
||||
"name": "Filament Sufficiency",
|
||||
"primary": "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length') | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight') | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length') | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color') | default('', true) | string).split(';') %}\n{% set q = p | replace('#','') | lower | trim %}\n{% if q not in ['','none','unknown','unavailable'] %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot') | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false, ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman') if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location') | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10] %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status') | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown', label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle' %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{% elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH' %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough' %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle' %}no active print{% else %}{{ job_g }} g needed · {{ used_g }} g used{% endif %}",
|
||||
"secondary": "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length') | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight') | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length') | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color') | default('', true) | string).split(';') %}\n{% set q = p | replace('#','') | lower | trim %}\n{% if q not in ['','none','unknown','unavailable'] %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot') | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false, ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman') if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location') | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10] %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif %}\n{% endif %}\n{% endfor %}\n{% set active = (states('sensor.sparkx_i7_print_status') | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown', label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle' %}\n{% set v.label = 'no active print' %}\n{% elif job_g <= 0 %}\n{% set v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{% elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH' %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough' %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'no spool loaded' %}\n{% endif %}\n{% if v.state == 'idle' %}last job: {{ job_g }} g needed{% else %}{{ rem_g }} g left to print · {{ v.label }}{% endif %}",
|
||||
"type": "custom:mushroom-template-card"
|
||||
},
|
||||
{
|
||||
"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": "°C"
|
||||
},
|
||||
{
|
||||
"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": "°C"
|
||||
},
|
||||
{
|
||||
"entity": "sensor.sparkx_i7_real_time_flow",
|
||||
"grid_options": {
|
||||
"columns": 4
|
||||
},
|
||||
"max": 40,
|
||||
"min": 0,
|
||||
"name": "Flow",
|
||||
"severity": {
|
||||
"green": 0,
|
||||
"red": 24,
|
||||
"yellow": 12
|
||||
},
|
||||
"type": "gauge"
|
||||
}
|
||||
],
|
||||
"type": "grid"
|
||||
}
|
||||
],
|
||||
"type": "sections"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -673,6 +673,24 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "grid",
|
||||
"cards": [
|
||||
{
|
||||
"type": "heading",
|
||||
"heading": "New section"
|
||||
},
|
||||
{
|
||||
"show_state": true,
|
||||
"show_name": true,
|
||||
"camera_view": "live",
|
||||
"fit_mode": "cover",
|
||||
"type": "picture-entity",
|
||||
"entity": "camera.sparkx_i7_printer_camera",
|
||||
"camera_image": "camera.sparkx_i7_printer_camera"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||