From cfd23d897974595a099c11b7e994f0d33231a4c2 Mon Sep 17 00:00:00 2001 From: Home Assistant Version Control Date: Thu, 15 Oct 2026 17:23:46 +0000 Subject: [PATCH] .ha_mcp/logs/mcp_usage.jsonl --- .ha_mcp/logs/mcp_usage.jsonl | 1 + 1 file changed, 1 insertion(+) diff --git a/.ha_mcp/logs/mcp_usage.jsonl b/.ha_mcp/logs/mcp_usage.jsonl index 3c633acb..2208bfe8 100644 --- a/.ha_mcp/logs/mcp_usage.jsonl +++ b/.ha_mcp/logs/mcp_usage.jsonl @@ -4648,3 +4648,4 @@ {"timestamp": "2026-10-15T17:22:42.646615+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 3.948211669921875, "success": true, "error_message": null, "response_size_bytes": 122, "user_context": null} {"timestamp": "2026-10-15T17:23:08.258424+00:00", "tool_name": "ha_eval_template", "parameters": {"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(wrap='', label='Slot ' ~ n, grams='', band=0) %}\n {% if sp.ent != '' %}\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 rem_n = states(sp.ent) | float(-1) %}\n {% set v.band = 2 if (rem_n >= 0 and rem_n < 25) else (1 if (rem_n >= 0 and rem_n < 100) else 0) %}\n {% set v.wrap = ' warn-crit' if v.band == 2 else (' warn-low' if v.band == 1 else '') %}\n {% set v.grams = remain ~ 'g @ ' ~ pct ~ '%' %}\n {% else %}\n {% set v.wrap = '' %}\n {% set v.grams = 'empty' %}\n {% endif %}\n {% set ns.cards = ns.cards + ['slot ' ~ n ~ ': ' ~ sp.ent ~ ' | ' ~ v.grams ~ ' | wrap=\"' ~ v.wrap ~ '\" | label=\"Slot ' ~ n ~ (' ⚠' if v.band > 0 else '') ~ '\"'] %}\n{% endfor %}\n{{ ns.cards | join('\n') }}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 791.8293476104736, "success": true, "error_message": null, "response_size_bytes": 2059, "user_context": null} {"timestamp": "2026-10-15T17:23:22.532148+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298) %}\n{% set lencm = states('sensor.sparkx_i7_expected_material_length') | float(0) %}\n{% set wgt = states('sensor.sparkx_i7_expected_material_weight') | float(0) %}\n{% set job_g = ((wgt if wgt > 0 else lencm * gcm) | round(1)) %}\n{% set used_g = ((states('sensor.sparkx_i7_used_material_length') | float(0)) * gcm) | round(1) %}\n{% set rem_g = ([job_g - used_g, 0] | max) | round(1) %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color') | default('', true) | string).split(';') %}\n{% set q = p | replace('#','') | lower | trim %}\n{% if q not in ['','none','unknown','unavailable'] %}{% set gc.list = gc.list + [q] %}{% endif %}\n{% endfor %}\n{% set single = (gc.list | length) == 1 %}\n{% set aslot = (states('sensor.sparkx_i7_active_filament_slot') | default('', true) | string).split('_')[-1] %}\n{% set aslot = aslot if aslot in ['1','2','3','4'] else '' %}\n{% set s = namespace(short=false, ok=false, matched=0, active=false) %}\n{% for n in ['1','2','3','4'] %}\n{% set sp = namespace(id='', rem=-1) %}\n{% for e in integration_entities('spoolman') if e.endswith('_color_hex') %}\n{% if sp.id == '' and (state_attr(e[:-10],'location') | default('', true) | lower) == ('cfs lite ' ~ n) %}\n{% set sp.id = e[:-10] %}\n{% set sp.rem = states(e[:-10]) | float(-1) %}\n{% endif %}\n{% endfor %}\n{% if sp.id != '' and sp.rem >= 0 %}\n{% set s.matched = s.matched + 1 %}\n{% if single %}\n{% if n == aslot %}\n{% set s.active = true %}\n{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif %}\n{% else %}\n{% if sp.rem < job_g %}{% set s.short = true %}{% else %}{% set s.ok = true %}{% endif %}\n{% endif %}\n{% endif %}\n{% endfor %}\n{% set v = namespace(state='unknown', label='check unavailable') %}\n{% if job_g <= 0 %}\n{% set v.state = 'none' %}\n{% set v.label = 'no slicer estimate yet' %}\n{% elif s.short %}\n{% set v.state = 'short' %}\n{% set v.label = 'NOT ENOUGH' %}\n{% elif s.ok %}\n{% set v.state = 'ok' %}\n{% set v.label = 'enough' %}\n{% elif single and aslot == '' %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'no active CFS slot' %}\n{% elif single and not s.active %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'active slot has no spool' %}\n{% elif s.matched == 0 %}\n{% set v.state = 'unknown' %}\n{% set v.label = 'no spool loaded' %}\n{% endif %}\nPRIMARY: {{ job_g }} g needed · {{ used_g }} g used\nSECONDARY: {{ rem_g }} g left to print · {{ v.label }}\nICON: {% if v.state == 'ok' %}green{% elif v.state == 'short' %}red{% elif v.state == 'none' %}grey{% else %}orange{% endif %}\nDEBUG: single={{ single }} colors={{ gc.list }} aslot={{ aslot }} matched={{ s.matched }} short={{ s.short }} ok={{ s.ok }}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 78.07493209838867, "success": true, "error_message": null, "response_size_bytes": 3534, "user_context": null} +{"timestamp": "2026-10-15T17:23:39.201632+00:00", "tool_name": "ha_config_get_dashboard", "parameters": {"url_path": "3d-printer-cellphone", "list_only": false, "force_reload": false, "entity_id": null, "card_type": "custom:auto-entities", "heading": null, "include_config": true, "include_screenshot": false, "view_path": null, "query": null, "describe": false}, "execution_time_ms": 8.448600769042969, "success": true, "error_message": null, "response_size_bytes": 4673, "user_context": null}