From 0ff7685d8a600586170f7b795815766c3e9a16be Mon Sep 17 00:00:00 2001 From: Home Assistant Version Control Date: Thu, 15 Oct 2026 17:22:48 +0000 Subject: [PATCH] .ha_mcp/logs/mcp_usage.jsonl --- .ha_mcp/logs/mcp_usage.jsonl | 1 + 1 file changed, 1 insertion(+) diff --git a/.ha_mcp/logs/mcp_usage.jsonl b/.ha_mcp/logs/mcp_usage.jsonl index fe2dfe45..03be1179 100644 --- a/.ha_mcp/logs/mcp_usage.jsonl +++ b/.ha_mcp/logs/mcp_usage.jsonl @@ -4645,3 +4645,4 @@ {"timestamp": "2026-10-15T17:14:21.836968+00:00", "tool_name": "ha_config_get_automation", "parameters": {"identifier": "1792076023718"}, "execution_time_ms": 299.9892234802246, "success": true, "error_message": null, "response_size_bytes": 2946, "user_context": null} {"timestamp": "2026-10-15T17:14:21.943547+00:00", "tool_name": "ha_config_get_automation", "parameters": {"identifier": "1791477238799"}, "execution_time_ms": 405.3964614868164, "success": true, "error_message": null, "response_size_bytes": 7549, "user_context": null} {"timestamp": "2026-10-15T17:22:03.162165+00:00", "tool_name": "ha_config_set_dashboard", "parameters": {"url_path": "3d-printer-cellphone", "config": null, "python_transform": "c = config['views'][0]['sections'][0]['cards']\nlogic = '''{% 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 v = namespace(state='unknown', label='check unavailable') %}\n{% if 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 %}\n'''\ncard = {\n 'type': 'custom:mushroom-template-card',\n 'entity': 'sensor.sparkx_i7_expected_material_length',\n 'name': 'Filament Sufficiency',\n 'icon': 'mdi:scale-balance',\n 'icon_color': logic + '''{% if v.state == 'ok' %}green{% elif v.state == 'short' %}red{% elif v.state == 'none' %}grey{% else %}orange{% endif %}''',\n 'primary': logic + '{{ job_g }} g needed · {{ used_g }} g used',\n 'secondary': logic + '{{ rem_g }} g left to print · {{ v.label }}',\n 'multiline_secondary': True,\n 'grid_options': {'columns': 6, 'rows': 'auto'}\n}\nc.insert(9, card)", "config_hash": "74d2ffc9bdc7b809", "title": null, "icon": null, "require_admin": null, "show_in_sidebar": null, "MandatoryBPS": false, "BestPracticeKey": null, "return_screenshot": false, "view_path": null, "patch": null}, "execution_time_ms": 22836.2557888031, "success": true, "error_message": null, "response_size_bytes": 3669, "user_context": null} +{"timestamp": "2026-10-15T17:22:42.646615+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 3.948211669921875, "success": true, "error_message": null, "response_size_bytes": 122, "user_context": null}