.storage/lovelace.sparkx_i7
This commit is contained in:
+32
-32
@@ -1002,6 +1002,38 @@
|
||||
"columns": "full"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "tile",
|
||||
"entity": "sensor.sparkx_i7_used_material_length",
|
||||
"name": "Used Material Total (cm)",
|
||||
"icon": "mdi:plus-minus",
|
||||
"grid_options": {
|
||||
"columns": "full"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "tile",
|
||||
"entity": "sensor.sparkx_i7_filament_weight_estimated",
|
||||
"name": "Current Job Weight (est.)",
|
||||
"icon": "mdi:weight-gram",
|
||||
"grid_options": {
|
||||
"columns": 12,
|
||||
"rows": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "custom:mushroom-template-card",
|
||||
"entity": "sensor.sparkx_i7_active_filament_slot",
|
||||
"name": "Next Deduction Match",
|
||||
"icon": "mdi:magnet",
|
||||
"icon_color": "{% set slot = states('sensor.sparkx_i7_active_filament_slot') %}{% set c = states('sensor.sparkx_i7_cfs_' ~ (slot | lower | replace(' ', '_')) ~ '_color') | replace('#', '') | lower %}{% if c | length == 6 %}#{{ c }}{% else %}var(--primary-color){% endif %}",
|
||||
"primary": "{{ states('sensor.sparkx_i7_active_filament_slot') }}",
|
||||
"secondary": "{% set slot = states('sensor.sparkx_i7_active_filament_slot') %}{% set ce = 'sensor.sparkx_i7_cfs_' ~ (slot | lower | replace(' ', '_')) ~ '_color' %}{% set color = states(ce) | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}Color #{{ color | upper }} → spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id ~ '_filament_name') }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left){% elif slot in ['', 'unknown', 'unavailable'] %}No slot latched{% elif color in ['', 'unknown', 'unavailable'] %}Slot color unavailable{% else %}Color #{{ color | upper }} — no spool with stock{% endif %}",
|
||||
"multiline_secondary": true,
|
||||
"grid_options": {
|
||||
"columns": "full"
|
||||
}
|
||||
},
|
||||
{
|
||||
"preset": "spoolman",
|
||||
"title": "Filament",
|
||||
@@ -1040,38 +1072,6 @@
|
||||
"spool_actions": {},
|
||||
"type": "custom:filament-card"
|
||||
},
|
||||
{
|
||||
"type": "tile",
|
||||
"entity": "sensor.sparkx_i7_used_material_length",
|
||||
"name": "Used Material Total (cm)",
|
||||
"icon": "mdi:plus-minus",
|
||||
"grid_options": {
|
||||
"columns": "full"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "tile",
|
||||
"entity": "sensor.sparkx_i7_filament_weight_estimated",
|
||||
"name": "Current Job Weight (est.)",
|
||||
"icon": "mdi:weight-gram",
|
||||
"grid_options": {
|
||||
"columns": 12,
|
||||
"rows": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "custom:mushroom-template-card",
|
||||
"entity": "sensor.sparkx_i7_active_filament_slot",
|
||||
"name": "Next Deduction Match",
|
||||
"icon": "mdi:magnet",
|
||||
"icon_color": "{% set slot = states('sensor.sparkx_i7_active_filament_slot') %}{% set c = states('sensor.sparkx_i7_cfs_' ~ (slot | lower | replace(' ', '_')) ~ '_color') | replace('#', '') | lower %}{% if c | length == 6 %}#{{ c }}{% else %}var(--primary-color){% endif %}",
|
||||
"primary": "{{ states('sensor.sparkx_i7_active_filament_slot') }}",
|
||||
"secondary": "{% set slot = states('sensor.sparkx_i7_active_filament_slot') %}{% set ce = 'sensor.sparkx_i7_cfs_' ~ (slot | lower | replace(' ', '_')) ~ '_color' %}{% set color = states(ce) | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}{% if ns.id %}Color #{{ color | upper }} → spool {{ ns.id }} ({{ states('sensor.spoolman_spool_' ~ ns.id ~ '_filament_name') }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left){% elif slot in ['', 'unknown', 'unavailable'] %}No slot latched{% elif color in ['', 'unknown', 'unavailable'] %}Slot color unavailable{% else %}Color #{{ color | upper }} — no spool with stock{% endif %}",
|
||||
"multiline_secondary": true,
|
||||
"grid_options": {
|
||||
"columns": "full"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "markdown",
|
||||
"content": "**Spoolman UI:** [http://192.168.1.140:7912](http://192.168.1.140:7912)\n\nEach CFS slot is matched to the Spoolman spool with the same **color hex** that still has stock (remaining > 0) **and whose location is CFS Lite**. All 4 rolls live in the **CFS Lite** location in Spoolman.\n\n**Replaced a roll?** Register the new roll in Spoolman with the same color hex and location CFS Lite. No Home Assistant changes needed — a same-color roll in another location (e.g. Storage) is ignored, and exhausted spools are skipped automatically.",
|
||||
|
||||
Reference in New Issue
Block a user