.ha_mcp/logs/mcp_usage.jsonl, .storage/lovelace.sparkx_i7
This commit is contained in:
@@ -851,7 +851,7 @@
|
||||
"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 }} · {% endif %}{{ states('sensor.sparkx_i7_cfs_box_1_slot_4_remaining') }}% left",
|
||||
"secondary": "{% set col = states('sensor.sparkx_i7_slot_4_color_name') %}{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_4_color') | replace('#','') | lower %}{% set ns = namespace(id='', rem=0, base=0) %}{% for e in integration_entities('spoolman') if e.endswith('_color_hex') %}{% if ns.id == '' and (states(e) | replace('#','') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set ns.id = states(e[:-10] ~ '_id') %}{% set ns.rem = states(e[:-10]) | float(0) %}{% set ns.base = state_attr(e[:-10], 'filament_weight') | float(0) %}{% endif %}{% endfor %}{% if col %}{{ col }} · {% endif %}{% if ns.id != '' %}{{ ns.rem | round(0) | int }} g left ({{ (ns.rem / ns.base * 100) | round(0) | int if ns.base > 0 else 0 }}%){% else %}no spool matched{% endif %}",
|
||||
"type": "custom:mushroom-template-card"
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user