.ha_mcp/backups/dashboard.3d-printer-cellphone.20261015_171100.yaml, .storage/lovelace.3d_printer_cellphone
This commit is contained in:
@@ -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
|
||||
@@ -78,7 +78,7 @@
|
||||
"rows": 1
|
||||
},
|
||||
"icon": "mdi:plus-minus",
|
||||
"name": "Used Material Total (cm)",
|
||||
"name": "Used Material Total",
|
||||
"type": "tile"
|
||||
},
|
||||
{
|
||||
@@ -86,17 +86,11 @@
|
||||
"features_position": "bottom",
|
||||
"name": "Print ETA",
|
||||
"type": "tile",
|
||||
"vertical": false
|
||||
},
|
||||
{
|
||||
"entity": "sensor.sparkx_i7_filament_weight_estimated",
|
||||
"vertical": false,
|
||||
"grid_options": {
|
||||
"columns": 6,
|
||||
"rows": 1
|
||||
},
|
||||
"icon": "mdi:weight-gram",
|
||||
"name": "Current Job Weight (est.)",
|
||||
"type": "tile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"entity": "sensor.sparkx_i7_filament_weight_estimated",
|
||||
@@ -154,13 +148,13 @@
|
||||
"grid_options": {
|
||||
"columns": 4
|
||||
},
|
||||
"max": 20,
|
||||
"max": 40,
|
||||
"min": 0,
|
||||
"name": "Flow",
|
||||
"severity": {
|
||||
"green": 0,
|
||||
"red": 12,
|
||||
"yellow": 6
|
||||
"yellow": 12,
|
||||
"red": 24
|
||||
},
|
||||
"type": "gauge"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user