.ha_mcp/logs/mcp_usage.jsonl

This commit is contained in:
Home Assistant Version Control
2026-10-15 16:26:26 +00:00
parent f2cc42b438
commit 85299a8f13
+2
View File
@@ -4625,3 +4625,5 @@
{"timestamp": "2026-10-15T16:17:10.691742+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": 36.33856773376465, "success": true, "error_message": null, "response_size_bytes": 3648, "user_context": null}
{"timestamp": "2026-10-15T16:22:54.751679+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 s.entity_id.startswith('sensor.spoolman_spool_') and s.entity_id.endswith('_color_hex') and sp.ent == '' %}\n {% set loc = (s.attributes.location | default('')) | lower %}\n {% if loc == ('cfs lite ' ~ n) %}\n {% set sp.ent = s.entity_id[:-10] %}\n {% endif %}\n {% endif %}\n {% endfor %}\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 = (states(sp.ent) | default(0) | float(0)) | round(1) %}\n {% set total = state_attr(sp.ent, 'filament_weight') | float(0) %}\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 card = {\"slot\": n, \"entity\": sp.ent ~ '_color_hex', \"hex\": hex_clean, \"remain\": remain, \"total\": total, \"pct\": pct} %}\n {% set ns.cards = ns.cards + [card] %}\n {% endif %}\n{% endfor %}\n{{ ns.cards | tojson }}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 294.2211627960205, "success": true, "error_message": null, "response_size_bytes": 1327, "user_context": null}
{"timestamp": "2026-10-15T16:23:44.717202+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 {% 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(0) %}\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 card = {\"slot\": n, \"entity\": sp.ent, \"hex\": hex_clean, \"remain\": remain, \"total\": total, \"pct\": pct} %}\n {% set ns.cards = ns.cards + [card] %}\n {% endif %}\n{% endfor %}\n{{ ns.cards | tojson }}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 157.8845977783203, "success": true, "error_message": null, "response_size_bytes": 1866, "user_context": null}
{"timestamp": "2026-10-15T16:26:20.673229+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": 153.18608283996582, "success": true, "error_message": null, "response_size_bytes": 4216, "user_context": null}
{"timestamp": "2026-10-15T16:26:20.681802+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "{% set ns = namespace(out=[]) %}\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 {% 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(0) %}\n {% set pct = ((remain / total) * 100) | round(0) | int if total > 0 else 0 %}\n {% set ns.out = ns.out + ['Slot ' ~ n ~ ': ' ~ state_attr(sp.ent, 'filament_name') ~ ' | ' ~ remain ~ 'g | ' ~ pct ~ '% | ' ~ hex_clean] %}\n {% else %}\n {% set ns.out = ns.out + ['Slot ' ~ n ~ ': (no spool matched)'] %}\n {% endif %}\n{% endfor %}\n{{ ns.out | join('\\n') }}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 162.2483730316162, "success": true, "error_message": null, "response_size_bytes": 1580, "user_context": null}