diff --git a/.ha_mcp/logs/mcp_usage.jsonl b/.ha_mcp/logs/mcp_usage.jsonl index 58305606..b99791ac 100644 --- a/.ha_mcp/logs/mcp_usage.jsonl +++ b/.ha_mcp/logs/mcp_usage.jsonl @@ -4492,3 +4492,5 @@ {"timestamp": "2026-10-14T13:51:49.259836+00:00", "tool_name": "ha_get_state", "parameters": {"entity_id": ["sensor.sparkx_i7_cfs_box_1_slot_1_color", "sensor.sparkx_i7_cfs_box_1_slot_2_color", "sensor.sparkx_i7_cfs_box_1_slot_3_color", "sensor.sparkx_i7_cfs_box_1_slot_4_color", "sensor.sparkx_i7_slot_1_color_name", "sensor.sparkx_i7_slot_2_color_name", "sensor.sparkx_i7_slot_3_color_name", "sensor.sparkx_i7_slot_4_color_name"], "fields": null, "attribute_keys": null}, "execution_time_ms": 2.43377685546875, "success": true, "error_message": null, "response_size_bytes": 4948, "user_context": null} {"timestamp": "2026-10-14T13:52:07.933100+00:00", "tool_name": "ha_search", "parameters": {"query": "slot_1_color_name", "domain_filter": null, "area_filter": null, "search_types": null, "limit": 20, "offset": 0, "exact_match": true, "include_hidden": true, "include_config": false, "group_by_domain": false, "per_domain_limit": null, "state_filter": null, "result_fields": null, "fields": null, "config_time_budget": null, "ctx": {"_STATE_TTL_SECONDS": 86400}}, "execution_time_ms": 598.2227325439453, "success": true, "error_message": null, "response_size_bytes": 684, "user_context": null} {"timestamp": "2026-10-14T13:52:15.604110+00:00", "tool_name": "ha_config_list_helpers", "parameters": {"helper_type": "template", "limit": 100, "offset": 0}, "execution_time_ms": 26.131153106689453, "success": true, "error_message": null, "response_size_bytes": 18400, "user_context": null} +{"timestamp": "2026-10-14T13:53:19.193153+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "{% set job_g = v_job_g | float(0) %}\n{% set gcol = v_gcol | string | replace('#','') | lower %}\n{% set mono = v_mono %}\n{% set cols = namespace(list=[]) %}\n{% for n in ['1','2','3','4'] %}\n{% set cc = states('sensor.sparkx_i7_cfs_box_1_slot_' ~ n ~ '_color') | replace('#','') | lower %}\n{% if cc not in ['','none','unknown','unavailable'] %}{% set cols.list = cols.list + [cc] %}{% endif %}\n{% endfor %}\n{% set per_slot = gcol if (mono and gcol != '' and gcol in cols.list) else '' %}\n{% set mono_offline = mono and gcol != '' and gcol not in cols.list %}\n{% set ns = namespace(req=[], short=[], missing=[], loaded=[], avail=0) %}\n{% for n in ['1','2','3','4'] %}\n{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_' ~ n ~ '_color') | replace('#','') | lower %}\n{% set cname = states('sensor.sparkx_i7_slot_' ~ n ~ '_color_name') %}\n{% set flabel = states('sensor.sparkx_i7_cfs_box_1_slot_' ~ n ~ '_filament') %}\n{% set label = 'Slot ' ~ n ~ ' ' ~ (cname if cname not in ['','unknown','unavailable'] else (flabel if flabel not in ['','unknown','unavailable'] else ('#' ~ (c | upper)))) %}\n{% set sp = namespace(id='', rem=0) %}\n{% for e in integration_entities('spoolman') if e.endswith('_color_hex') %}\n{% if sp.id == '' and (states(e) | replace('#','') | lower) == c and (state_attr(e[:-10],'location') | default('', true) | lower) == 'cfs lite' %}\n{% set sp.id = e[:-10] %}\n{% set sp.rem = states(e[:-10]) | float(0) %}\n{% endif %}\n{% endfor %}\n{% if sp.id != '' %}\n{% set ns.avail = ns.avail + sp.rem %}\n{% set ns.loaded = ns.loaded + [label ~ ': ' ~ (sp.rem | round(1)) ~ ' g'] %}\n{% endif %}\n{% if job_g > 0 %}\n{% set req = job_g if (per_slot == '' or c == per_slot) else 0 %}\n{% if req > 0 %}\n{% if sp.id == '' %}\n{% set ns.missing = ns.missing + [label ~ ' (#' ~ (c | upper) ~ ')'] %}\n{% elif sp.rem < req %}\n{% set ns.short = ns.short + [label ~ ': ' ~ (sp.rem | round(1)) ~ ' g left, up to ' ~ req ~ ' g needed'] %}\n{% else %}\n{% set ns.req = ns.req + [label ~ ': ' ~ (sp.rem | round(1)) ~ ' g left, up to ' ~ req ~ ' g needed'] %}\n{% endif %}\n{% endif %}\n{% endif %}\n{% endfor %}\n{% if job_g <= 0 %}Cannot verify: slicer filament estimate not available yet.{% if ns.loaded %} Loaded: {{ ns.loaded | join('; ') }}.{% endif %}\n{% elif mono_offline %}Cannot verify: this looks like a single-colour print of #{{ gcol | upper }}, which is not in a loaded CFS slot.\n{% elif ns.short %}NOT ENOUGH filament - possible shortfall:\n{{ ns.short | join('\\n') }}{% if ns.req %}\nOK: {{ ns.req | join('; ') }}{% endif %}{% if ns.missing %}\nNo Spoolman spool matched for: {{ ns.missing | join(', ') }}{% endif %}\n{% elif ns.req %}Enough filament:\n{{ ns.req | join('\\n') }}{% if ns.missing %}\nNo Spoolman spool matched for: {{ ns.missing | join(', ') }}{% endif %}\n{% else %}Cannot verify: could not match this job's filament to a loaded CFS slot.{% endif %}", "condition": null, "variables": {"v_job_g": 150, "v_gcol": "", "v_mono": false}, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 356.2769889831543, "success": true, "error_message": null, "response_size_bytes": 4097, "user_context": null} +{"timestamp": "2026-10-14T13:53:19.207342+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "{% set job_g = v_job_g | float(0) %}\n{% set gcol = v_gcol | string | replace('#','') | lower %}\n{% set mono = v_mono %}\n{% set cols = namespace(list=[]) %}\n{% for n in ['1','2','3','4'] %}\n{% set cc = states('sensor.sparkx_i7_cfs_box_1_slot_' ~ n ~ '_color') | replace('#','') | lower %}\n{% if cc not in ['','none','unknown','unavailable'] %}{% set cols.list = cols.list + [cc] %}{% endif %}\n{% endfor %}\n{% set per_slot = gcol if (mono and gcol != '' and gcol in cols.list) else '' %}\n{% set mono_offline = mono and gcol != '' and gcol not in cols.list %}\n{% set ns = namespace(req=[], short=[], missing=[], loaded=[], avail=0) %}\n{% for n in ['1','2','3','4'] %}\n{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_' ~ n ~ '_color') | replace('#','') | lower %}\n{% set cname = states('sensor.sparkx_i7_slot_' ~ n ~ '_color_name') %}\n{% set flabel = states('sensor.sparkx_i7_cfs_box_1_slot_' ~ n ~ '_filament') %}\n{% set label = 'Slot ' ~ n ~ ' ' ~ (cname if cname not in ['','unknown','unavailable'] else (flabel if flabel not in ['','unknown','unavailable'] else ('#' ~ (c | upper)))) %}\n{% set sp = namespace(id='', rem=0) %}\n{% for e in integration_entities('spoolman') if e.endswith('_color_hex') %}\n{% if sp.id == '' and (states(e) | replace('#','') | lower) == c and (state_attr(e[:-10],'location') | default('', true) | lower) == 'cfs lite' %}\n{% set sp.id = e[:-10] %}\n{% set sp.rem = states(e[:-10]) | float(0) %}\n{% endif %}\n{% endfor %}\n{% if sp.id != '' %}\n{% set ns.avail = ns.avail + sp.rem %}\n{% set ns.loaded = ns.loaded + [label ~ ': ' ~ (sp.rem | round(1)) ~ ' g'] %}\n{% endif %}\n{% if job_g > 0 %}\n{% set req = job_g if (per_slot == '' or c == per_slot) else 0 %}\n{% if req > 0 %}\n{% if sp.id == '' %}\n{% set ns.missing = ns.missing + [label ~ ' (#' ~ (c | upper) ~ ')'] %}\n{% elif sp.rem < req %}\n{% set ns.short = ns.short + [label ~ ': ' ~ (sp.rem | round(1)) ~ ' g left, up to ' ~ req ~ ' g needed'] %}\n{% else %}\n{% set ns.req = ns.req + [label ~ ': ' ~ (sp.rem | round(1)) ~ ' g left, up to ' ~ req ~ ' g needed'] %}\n{% endif %}\n{% endif %}\n{% endif %}\n{% endfor %}\n{% if job_g <= 0 %}Cannot verify: slicer filament estimate not available yet.{% if ns.loaded %} Loaded: {{ ns.loaded | join('; ') }}.{% endif %}\n{% elif mono_offline %}Cannot verify: this looks like a single-colour print of #{{ gcol | upper }}, which is not in a loaded CFS slot.\n{% elif ns.short %}NOT ENOUGH filament - possible shortfall:\n{{ ns.short | join('\\n') }}{% if ns.req %}\nOK: {{ ns.req | join('; ') }}{% endif %}{% if ns.missing %}\nNo Spoolman spool matched for: {{ ns.missing | join(', ') }}{% endif %}\n{% elif ns.req %}Enough filament:\n{{ ns.req | join('\\n') }}{% if ns.missing %}\nNo Spoolman spool matched for: {{ ns.missing | join(', ') }}{% endif %}\n{% else %}Cannot verify: could not match this job's filament to a loaded CFS slot.{% endif %}", "condition": null, "variables": {"v_job_g": 150, "v_gcol": "FFFFFF", "v_mono": true}, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 369.60887908935547, "success": true, "error_message": null, "response_size_bytes": 3942, "user_context": null}