.ha_mcp/logs/mcp_usage.jsonl
This commit is contained in:
@@ -4655,3 +4655,4 @@
|
||||
{"timestamp": "2026-10-15T17:36:19.741875+00:00", "tool_name": "ha_config_get_dashboard", "parameters": {"url_path": "3d-printer-cellphone", "list_only": false, "force_reload": false, "entity_id": "sensor.sparkx_i7_expected_material_length", "card_type": null, "heading": null, "include_config": true, "include_screenshot": false, "view_path": null, "query": null, "describe": false}, "execution_time_ms": 8.350372314453125, "success": true, "error_message": null, "response_size_bytes": 8642, "user_context": null}
|
||||
{"timestamp": "2026-10-15T17:39:32.357678+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 active = (states('sensor.sparkx_i7_print_status') | default('', true)) in ['printing','paused'] %}\n{% set v = namespace(state='unknown', label='check unavailable') %}\n{% if not active %}\n{% set v.state = 'idle' %}\n{% set v.label = 'no active print' %}\n{% elif 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: {% if v.state == 'idle' %}no active print{% else %}{{ job_g }} g needed · {{ used_g }} g used{% endif %}\nSECONDARY: {% if v.state == 'idle' %}last job: {{ job_g }} g needed{% else %}{{ rem_g }} g left to print · {{ v.label }}{% endif %}\nICON: {% if v.state == 'ok' %}green{% elif v.state == 'short' %}red{% elif v.state in ['none','idle'] %}grey{% else %}orange{% endif %}\nDEBUG: state={{ v.state }} active={{ active }} job_g={{ job_g }} matched={{ s.matched }}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 52.841901779174805, "success": true, "error_message": null, "response_size_bytes": 3834, "user_context": null}
|
||||
{"timestamp": "2026-10-15T17:40:20.447044+00:00", "tool_name": "ha_config_set_dashboard", "parameters": {"url_path": "3d-printer-cellphone", "config": null, "python_transform": "config['views'][0]['sections'][0]['cards'][8]['primary'] = config['views'][0]['sections'][0]['cards'][8]['primary'].replace(\"{% set v = namespace(state='unknown', label='check unavailable') %}\\n{% if job_g <= 0 %}\", \"{% set active = (states('sensor.sparkx_i7_print_status') | default('', true)) in ['printing','paused'] %}\\n{% set v = namespace(state='unknown', label='check unavailable') %}\\n{% if not active %}\\n{% set v.state = 'idle' %}\\n{% set v.label = 'no active print' %}\\n{% elif job_g <= 0 %}\").replace(\"{{ job_g }} g needed · {{ used_g }} g used\", \"{% if v.state == 'idle' %}no active print{% else %}{{ job_g }} g needed · {{ used_g }} g used{% endif %}\")\nconfig['views'][0]['sections'][0]['cards'][8]['secondary'] = config['views'][0]['sections'][0]['cards'][8]['secondary'].replace(\"{% set v = namespace(state='unknown', label='check unavailable') %}\\n{% if job_g <= 0 %}\", \"{% set active = (states('sensor.sparkx_i7_print_status') | default('', true)) in ['printing','paused'] %}\\n{% set v = namespace(state='unknown', label='check unavailable') %}\\n{% if not active %}\\n{% set v.state = 'idle' %}\\n{% set v.label = 'no active print' %}\\n{% elif job_g <= 0 %}\").replace(\"{{ rem_g }} g left to print · {{ v.label }}\", \"{% if v.state == 'idle' %}last job: {{ job_g }} g needed{% else %}{{ rem_g }} g left to print · {{ v.label }}{% endif %}\")\nconfig['views'][0]['sections'][0]['cards'][8]['icon_color'] = config['views'][0]['sections'][0]['cards'][8]['icon_color'].replace(\"{% set v = namespace(state='unknown', label='check unavailable') %}\\n{% if job_g <= 0 %}\", \"{% set active = (states('sensor.sparkx_i7_print_status') | default('', true)) in ['printing','paused'] %}\\n{% set v = namespace(state='unknown', label='check unavailable') %}\\n{% if not active %}\\n{% set v.state = 'idle' %}\\n{% set v.label = 'no active print' %}\\n{% elif job_g <= 0 %}\").replace(\"{% if v.state == 'ok' %}green{% elif v.state == 'short' %}red{% elif v.state == 'none' %}grey{% else %}orange{% endif %}\", \"{% if v.state == 'ok' %}green{% elif v.state == 'short' %}red{% elif v.state in ['none','idle'] %}grey{% else %}orange{% endif %}\")", "config_hash": "8beef2d2b18457a0", "title": null, "icon": null, "require_admin": null, "show_in_sidebar": null, "MandatoryBPS": true, "BestPracticeKey": null, "return_screenshot": false, "view_path": null, "patch": null}, "execution_time_ms": 8502.457618713379, "success": true, "error_message": null, "response_size_bytes": 33812, "user_context": null}
|
||||
{"timestamp": "2026-10-15T17:40:31.418161+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": null, "heading": "Filament Sufficiency", "include_config": true, "include_screenshot": false, "view_path": null, "query": null, "describe": false}, "execution_time_ms": 4.968404769897461, "success": true, "error_message": null, "response_size_bytes": 388, "user_context": null}
|
||||
|
||||
Reference in New Issue
Block a user