This commit is contained in:
Home Assistant Version Control
2026-10-16 20:16:28 +00:00
parent 7663ac9d5d
commit 5c2be30851
3 changed files with 502 additions and 4 deletions
+4 -4
View File
@@ -31,7 +31,7 @@
"type": "custom:mushroom-template-card",
"entity": "sensor.sparkx_i7_cfs_box_1_slot_1_color",
"name": "",
"icon": "mdi:weight-gram",
"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": ""
@@ -40,7 +40,7 @@
"type": "custom:mushroom-template-card",
"entity": "sensor.sparkx_i7_cfs_box_1_slot_2_color",
"name": "",
"icon": "mdi:weight-gram",
"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": ""
@@ -49,7 +49,7 @@
"type": "custom:mushroom-template-card",
"entity": "sensor.sparkx_i7_cfs_box_1_slot_3_color",
"name": "",
"icon": "mdi:weight-gram",
"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": ""
@@ -58,7 +58,7 @@
"type": "custom:mushroom-template-card",
"entity": "sensor.sparkx_i7_cfs_box_1_slot_4_color",
"name": "",
"icon": "mdi:weight-gram",
"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": ""