.ha_mcp/logs/mcp_usage.jsonl
This commit is contained in:
@@ -4636,3 +4636,4 @@
|
||||
{"timestamp": "2026-10-15T16:46:12.922819+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='', loc='') %}\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) %}{% set sp.ent = s.entity_id %}{% set sp.loc = s.attributes.location %}{% endif %}\n {% endif %}\n {% endfor %}\n {% if sp.ent != '' %}\n {% set r = states(sp.ent) | float(0) %}\n {% set band = 2 if r < 25 else (1 if r < 100 else 0) %}\n {% set ns.out = ns.out + ['Slot ' ~ n ~ ' -> ' ~ sp.loc ~ ' | ' ~ (r|round(1)) ~ ' g | band ' ~ band] %}\n {% else %}\n {% set ns.out = ns.out + ['Slot ' ~ n ~ ' -> NO MATCHING SPOOL -> tube OMITTED from card'] %}\n {% endif %}\n{% endfor %}\n{{ ns.out | join('\\n') }}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 262.3310089111328, "success": true, "error_message": null, "response_size_bytes": 1247, "user_context": null}
|
||||
{"timestamp": "2026-10-15T16:47:15.086730+00:00", "tool_name": "ha_get_history", "parameters": {"entity_ids": "sensor.sparkx_i7_real_time_flow", "source": "statistics", "start_time": "2d", "end_time": null, "minimal_response": true, "significant_changes_only": true, "limit": null, "offset": null, "period": "day", "statistic_types": ["max", "min"], "order": "desc", "fields": null, "include_schema": false, "core_options": null, "ctx": "Context(_STATE_TTL_SECONDS=86400)"}, "execution_time_ms": 67.47126579284668, "success": true, "error_message": null, "response_size_bytes": 1230, "user_context": null}
|
||||
{"timestamp": "2026-10-15T17:07:22.988750+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "{{ {'is_number_unavail': is_number(states('sensor.sparkx_moonraker_print_eta')) is sameas false, 'ok': is_number('12.5'), 'bad': is_number('unavailable')} }}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 16.196489334106445, "success": true, "error_message": null, "response_size_bytes": 365, "user_context": null}
|
||||
{"timestamp": "2026-10-15T17:08:47.294411+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(html='', label='Slot ' ~ n, border='transparent') %}\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(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 v.border = '#d0d0d0' if hex_clean | lower in ['#ffffff', '#fff'] else 'transparent' %}\n {% set v.html = \"TUBE remain=\" ~ remain ~ \" pct=\" ~ pct ~ \" hex=\" ~ hex_clean %}\n {% set v.label = 'Slot ' ~ n %}\n {% else %}\n {% set v.html = \"EMPTY\" %}\n {% set v.label = \"<span class='slot-warn'>Slot \" ~ n ~ \" — empty</span>\" %}\n {% endif %}\n {% set card = {\n \"type\": \"custom:button-card\",\n \"entity\": sp.ent if sp.ent != '' else 'sensor.sparkx_i7_active_filament_slot',\n \"html\": v.html,\n \"label\": v.label,\n \"border\": v.border,\n \"tap\": \"more-info\" if sp.ent != '' else \"none\"\n } %}\n {% set ns.cards = ns.cards + [card] %}\n{% endfor %}\n{{ ns.cards }}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 180.68814277648926, "success": true, "error_message": null, "response_size_bytes": 2729, "user_context": null}
|
||||
|
||||
Reference in New Issue
Block a user