.ha_mcp/logs/mcp_usage.jsonl

This commit is contained in:
Home Assistant Version Control
2026-10-09 00:46:09 +00:00
parent c26e6966b8
commit 32f5873720
+1
View File
@@ -4176,3 +4176,4 @@
{"timestamp": "2026-10-09T00:42:31.924786+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "Candidates for yellow (#f8e911), all spools:\n{% for e in integration_entities('spoolman') if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == 'f8e911' %}\n{% set b = e[:-10] %}\n spool {{ states(b ~ '_id') }} | loc={{ state_attr(b, 'location') | default('MISSING', true) }} | rem={{ states(b) }} g\n{% endfor %}\n\nWITH location filter (production matcher):\n{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == 'f8e911' and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}-> spool {{ ns.id if ns.id else 'NO MATCH' }}\n\nWITHOUT location filter (old logic, same color+stock test):\n{% set ns2 = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == 'f8e911' %}{% set b = e[:-10] %}{% if (states(b) | float(0)) > 0 and ns2.id == '' %}{% set ns2.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}-> spool {{ ns2.id if ns2.id else 'NO MATCH' }}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 161.64255142211914, "success": true, "error_message": null, "response_size_bytes": 1924, "user_context": null}
{"timestamp": "2026-10-09T00:42:57.735604+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "{% 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 (states(e) | replace('#', '') | lower) == color and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% 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 }} · {{ state_attr('sensor.spoolman_spool_' ~ ns.id, 'filament_name') | 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 %}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 39.21103477478027, "success": true, "error_message": null, "response_size_bytes": 1275, "user_context": null}
{"timestamp": "2026-10-09T00:42:57.736292+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "SIMULATE CFS spool 6 exhausted/absent for #f8e911:\n\nWITH location filter:\n{% set ns = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == 'f8e911' and (state_attr(e[:-10], 'location') | default('', true) | lower) == 'cfs lite' %}{% set b = e[:-10] %}{% if not b.endswith('_6') and (states(b) | float(0)) > 0 and ns.id == '' %}{% set ns.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}-> spool {{ ns.id if ns.id else 'NO MATCH (correct - skips deduction)' }}\n\nWITHOUT location filter (old logic):\n{% set ns2 = namespace(id='') %}{% for e in integration_entities('spoolman') %}{% if e.endswith('_color_hex') and (states(e) | replace('#', '') | lower) == 'f8e911' %}{% set b = e[:-10] %}{% if not b.endswith('_6') and (states(b) | float(0)) > 0 and ns2.id == '' %}{% set ns2.id = states(b ~ '_id') %}{% endif %}{% endif %}{% endfor %}-> spool {{ ns2.id if ns2.id else 'NO MATCH' }} (would WRONGLY deduct from Storage spool 7)", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 36.47112846374512, "success": true, "error_message": null, "response_size_bytes": 1637, "user_context": null}
{"timestamp": "2026-10-09T00:46:06.326271+00:00", "tool_name": "ha_reload_core", "parameters": {"target": "all", "entry_id": "01M4E507NTYVDXT6ZHX4HMX9XV"}, "execution_time_ms": 6745.303153991699, "success": true, "error_message": null, "response_size_bytes": 166, "user_context": null}