3 files
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -4665,3 +4665,4 @@
|
||||
{"timestamp": "2026-10-15T18:42:50.908897+00:00", "tool_name": "ha_config_get_dashboard", "parameters": {"url_path": "sparkx-i7", "list_only": false, "force_reload": false, "entity_id": null, "card_type": null, "heading": null, "include_config": false, "include_screenshot": false, "view_path": null, "query": "input_number.sparkx_i7_slot_1_grams", "describe": false}, "execution_time_ms": 14.659404754638672, "success": true, "error_message": null, "response_size_bytes": 1659, "user_context": null}
|
||||
{"timestamp": "2026-10-15T18:42:57.166282+00:00", "tool_name": "ha_config_get_dashboard", "parameters": {"url_path": "sparkx-i7", "list_only": false, "force_reload": false, "entity_id": null, "card_type": null, "heading": null, "include_config": false, "include_screenshot": false, "view_path": null, "query": "input_number.sparkx_i7_slot_", "describe": false}, "execution_time_ms": 12.885332107543945, "success": true, "error_message": null, "response_size_bytes": 5435, "user_context": null}
|
||||
{"timestamp": "2026-10-15T18:43:31.646017+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "{% set st = states('sensor.sparkx_i7_print_status') %}{% set g = states('input_number.sparkx_i7_slot_1_grams') | float(0) %}A_PRINTING: • This print so far: {{ g | round(1) }} g\nA_IDLE: • Last print: {{ g | round(1) }} g\nB_PRINTING_ZERO: • This print: nothing booked yet\nB_PRINTING_SOME: • This print so far: {{ g | round(1) }} g\nB_IDLE: • Last print: {{ g | round(1) }} g\nlive_state={{ st }} live_g={{ g }}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 12.886285781860352, "success": true, "error_message": null, "response_size_bytes": 848, "user_context": null}
|
||||
{"timestamp": "2026-10-15T18:45:25.995550+00:00", "tool_name": "ha_config_set_dashboard", "parameters": {"url_path": "sparkx-i7", "config": null, "python_transform": "for n in ['1','2','3','4']: config['views'][2]['sections'][0]['cards'][int(n)+1]['secondary'] = config['views'][2]['sections'][0]['cards'][int(n)+1]['secondary'].replace(\"• This print: {{ (states('input_number.sparkx_i7_slot_\" + n + \"_grams') | float(0)) | round(1) }} g\", \"{% if states('sensor.sparkx_i7_print_status') in ['printing', 'paused'] %}• This print so far: {{ (states('input_number.sparkx_i7_slot_\" + n + \"_grams') | float(0)) | round(1) }} g{% else %}• Last print: {{ (states('input_number.sparkx_i7_slot_\" + n + \"_grams') | float(0)) | round(1) }} g{% endif %}\")", "config_hash": "0da5494d1fda0d1a", "title": null, "icon": null, "require_admin": null, "show_in_sidebar": null, "MandatoryBPS": true, "BestPracticeKey": null, "return_screenshot": false, "view_path": null, "patch": null}, "execution_time_ms": 16703.317165374756, "success": true, "error_message": null, "response_size_bytes": 32649, "user_context": null}
|
||||
|
||||
@@ -856,7 +856,7 @@
|
||||
"name": "Slot 1",
|
||||
"picture": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_1_color') | replace('#','') | lower %}{% set svg = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"96\" height=\"96\"><rect width=\"96\" height=\"96\" rx=\"20\" fill=\"#' ~ c ~ '\" stroke=\"rgba(127,127,127,0.6)\" stroke-width=\"4\"/></svg>' %}{{ 'data:image/svg+xml;base64,' ~ svg | base64_encode if c | length == 6 else '' }}",
|
||||
"primary": "{{ states('sensor.sparkx_i7_slot_1_color_name') }} (#{{ states('sensor.sparkx_i7_cfs_box_1_slot_1_color') | replace('#', '') | upper }})",
|
||||
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_1_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite 1' %}{% 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 %}• Spool {{ ns.id }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_vendor') | default('?', true) }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_material') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}\n• This print: {{ (states('input_number.sparkx_i7_slot_1_grams') | float(0)) | round(1) }} g",
|
||||
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_1_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite 1' %}{% 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 %}• Spool {{ ns.id }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_vendor') | default('?', true) }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_material') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}\n{% if states('sensor.sparkx_i7_print_status') in ['printing', 'paused'] %}• This print so far: {{ (states('input_number.sparkx_i7_slot_1_grams') | float(0)) | 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"
|
||||
},
|
||||
{
|
||||
@@ -870,7 +870,7 @@
|
||||
"name": "Slot 2",
|
||||
"picture": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_2_color') | replace('#','') | lower %}{% set svg = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"96\" height=\"96\"><rect width=\"96\" height=\"96\" rx=\"20\" fill=\"#' ~ c ~ '\" stroke=\"rgba(127,127,127,0.6)\" stroke-width=\"4\"/></svg>' %}{{ 'data:image/svg+xml;base64,' ~ svg | base64_encode if c | length == 6 else '' }}",
|
||||
"primary": "{{ states('sensor.sparkx_i7_slot_2_color_name') }} (#{{ states('sensor.sparkx_i7_cfs_box_1_slot_2_color') | replace('#', '') | upper }})",
|
||||
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_2_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite 2' %}{% 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 %}• Spool {{ ns.id }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_vendor') | default('?', true) }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_material') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}\n• This print: {{ (states('input_number.sparkx_i7_slot_2_grams') | float(0)) | round(1) }} g",
|
||||
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_2_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite 2' %}{% 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 %}• Spool {{ ns.id }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_vendor') | default('?', true) }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_material') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}\n{% if states('sensor.sparkx_i7_print_status') in ['printing', 'paused'] %}• This print so far: {{ (states('input_number.sparkx_i7_slot_2_grams') | float(0)) | 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"
|
||||
},
|
||||
{
|
||||
@@ -884,7 +884,7 @@
|
||||
"name": "Slot 3",
|
||||
"picture": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_3_color') | replace('#','') | lower %}{% set svg = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"96\" height=\"96\"><rect width=\"96\" height=\"96\" rx=\"20\" fill=\"#' ~ c ~ '\" stroke=\"rgba(127,127,127,0.6)\" stroke-width=\"4\"/></svg>' %}{{ 'data:image/svg+xml;base64,' ~ svg | base64_encode if c | length == 6 else '' }}",
|
||||
"primary": "{{ states('sensor.sparkx_i7_slot_3_color_name') }} (#{{ states('sensor.sparkx_i7_cfs_box_1_slot_3_color') | replace('#', '') | upper }})",
|
||||
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_3_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite 3' %}{% 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 %}• Spool {{ ns.id }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_vendor') | default('?', true) }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_material') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}\n• This print: {{ (states('input_number.sparkx_i7_slot_3_grams') | float(0)) | round(1) }} g",
|
||||
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_3_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite 3' %}{% 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 %}• Spool {{ ns.id }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_vendor') | default('?', true) }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_material') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}\n{% if states('sensor.sparkx_i7_print_status') in ['printing', 'paused'] %}• This print so far: {{ (states('input_number.sparkx_i7_slot_3_grams') | float(0)) | 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"
|
||||
},
|
||||
{
|
||||
@@ -898,7 +898,7 @@
|
||||
"name": "Slot 4",
|
||||
"picture": "{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_4_color') | replace('#','') | lower %}{% set svg = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"96\" height=\"96\"><rect width=\"96\" height=\"96\" rx=\"20\" fill=\"#' ~ c ~ '\" stroke=\"rgba(127,127,127,0.6)\" stroke-width=\"4\"/></svg>' %}{{ 'data:image/svg+xml;base64,' ~ svg | base64_encode if c | length == 6 else '' }}",
|
||||
"primary": "{{ states('sensor.sparkx_i7_slot_4_color_name') }} (#{{ states('sensor.sparkx_i7_cfs_box_1_slot_4_color') | replace('#', '') | upper }})",
|
||||
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_4_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite 4' %}{% 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 %}• Spool {{ ns.id }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_vendor') | default('?', true) }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_material') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}\n• This print: {{ (states('input_number.sparkx_i7_slot_4_grams') | float(0)) | round(1) }} g",
|
||||
"secondary": "{% set color = states('sensor.sparkx_i7_cfs_box_1_slot_4_color') | replace('#', '') | lower %}{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite 4' %}{% 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 %}• Spool {{ ns.id }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_vendor') | default('?', true) }} · {{ states('sensor.spoolman_spool_' ~ ns.id ~ '_material') | default('?', true) }} · {{ (states('sensor.spoolman_spool_' ~ ns.id) | float(0)) | round(1) }} g left{% elif color in ['', 'unknown', 'unavailable'] %}• Slot color unavailable{% else %}• No spool with stock matches this color{% endif %}\n{% if states('sensor.sparkx_i7_print_status') in ['printing', 'paused'] %}• This print so far: {{ (states('input_number.sparkx_i7_slot_4_grams') | float(0)) | round(1) }} g{% else %}• Last print: {{ (states('input_number.sparkx_i7_slot_4_grams') | float(0)) | round(1) }} g{% endif %}",
|
||||
"type": "custom:mushroom-template-card"
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user