This commit is contained in:
Home Assistant Version Control
2026-10-16 20:12:01 +00:00
parent 3c9fcfb512
commit d868470f90
4 changed files with 494 additions and 16 deletions
+44
View File
@@ -21,6 +21,50 @@
},
"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": {