diff --git a/.ha_mcp/logs/mcp_usage.jsonl b/.ha_mcp/logs/mcp_usage.jsonl index ba5276a1..f7d270ca 100644 --- a/.ha_mcp/logs/mcp_usage.jsonl +++ b/.ha_mcp/logs/mcp_usage.jsonl @@ -4590,3 +4590,5 @@ {"timestamp": "2026-10-15T14:53:44.343382+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": {"alias": "SparkX i7 - Low spool alert", "description": "Periodic scan of the CFS Lite slots (per-slot Spoolman location). Alerts once when a loaded spool drops below 100 g and again when it drops below 25 g. The 4-digit band string in input_text.sparkx_i7_low_spool_notified (slots 1-4, 0=ok, 1=<100 g, 2=<25 g) prevents repeat alerts.", "triggers": [{"trigger": "time_pattern", "minutes": "/15"}], "conditions": [], "actions": [{"variables": {"bands": "{% set prev = states('input_text.sparkx_i7_low_spool_notified') | default('0000', true) %}{% set ns = namespace(s='') %}{% for n in ['1','2','3','4'] %}{% set sp = namespace(id='', rem=-1) %}{% for e in integration_entities('spoolman') if e.endswith('_color_hex') %}{% if sp.id == '' and (state_attr(e[:-10],'location') | default('', true) | lower) == ('cfs lite ' ~ n) %}{% set sp.id = e[:-10] %}{% set sp.rem = states(e[:-10]) | float(-1) %}{% endif %}{% endfor %}{% set band = 2 if (sp.rem >= 0 and sp.rem < 25) else (1 if (sp.rem >= 0 and sp.rem < 100) else 0) %}{% set ns.s = ns.s ~ band %}{% endfor %}{{ ns.s }}", "report": "{% set prev = states('input_text.sparkx_i7_low_spool_notified') | default('0000', true) %}{% set ns = namespace(low=[]) %}{% for n in ['1','2','3','4'] %}{% set sp = namespace(id='', rem=-1) %}{% for e in integration_entities('spoolman') if e.endswith('_color_hex') %}{% if sp.id == '' and (state_attr(e[:-10],'location') | default('', true) | lower) == ('cfs lite ' ~ n) %}{% set sp.id = e[:-10] %}{% set sp.rem = states(e[:-10]) | float(-1) %}{% endif %}{% endfor %}{% set band = 2 if (sp.rem >= 0 and sp.rem < 25) else (1 if (sp.rem >= 0 and sp.rem < 100) else 0) %}{% set oldb = prev[n | int - 1] | int(-1) %}{% if band > oldb and band > 0 %}{% set cname = states('sensor.sparkx_i7_slot_' ~ n ~ '_color_name') %}{% set cname = cname if cname not in ['','unknown','unavailable'] else ('slot ' ~ n) %}{% set tag = ' - critically low' if band == 2 else '' %}{% set ns.low = ns.low + ['Slot ' ~ n ~ ' ' ~ cname ~ ': ' ~ (sp.rem | round(0) | int) ~ ' g left' ~ tag] %}{% endif %}{% endfor %}{% if ns.low %}Low filament on the SparkX i7 CFS Lite:\\n- {{ ns.low | join('\\n- ') }}{% endif %}"}}, {"if": [{"condition": "template", "value_template": "{{ report | trim != '' }}"}], "then": [{"action": "notify.persistent_notification", "data": {"title": "[REDACTED]", "message": "[REDACTED]"}}, {"action": "notify.mobile_app_francos_ipad", "data": {"title": "[REDACTED]", "message": "[REDACTED]"}}, {"action": "notify.mobile_app_sm_f956w", "data": {"title": "[REDACTED]", "message": "[REDACTED]"}}]}, {"action": "input_text.set_value", "target": {"entity_id": "input_text.sparkx_i7_low_spool_notified"}, "data": {"value": "{{ bands }}"}}], "mode": "single"}, "identifier": null, "python_transform": null, "config_hash": null, "take_control_of_blueprint": false, "category": null, "wait": true, "enabled": null, "run_actions": false, "MandatoryBPS": false, "BestPracticeKey": null}, "execution_time_ms": 646.2757587432861, "success": true, "error_message": null, "response_size_bytes": 1712, "user_context": null} {"timestamp": "2026-10-15T14:54:06.256077+00:00", "tool_name": "ha_config_get_automation", "parameters": {"identifier": "automation.sparkx_i7_low_spool_alert"}, "execution_time_ms": 1452.3441791534424, "success": true, "error_message": null, "response_size_bytes": 2946, "user_context": null} {"timestamp": "2026-10-15T15:06:25.350013+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.sparkx_i7_low_spool_alert", "python_transform": null, "config_hash": null, "take_control_of_blueprint": false, "category": null, "wait": true, "enabled": null, "run_actions": true, "MandatoryBPS": false, "BestPracticeKey": null}, "execution_time_ms": 166.2442684173584, "success": true, "error_message": null, "response_size_bytes": 126, "user_context": null} +{"timestamp": "2026-10-15T15:06:32.032943+00:00", "tool_name": "ha_get_state", "parameters": {"entity_id": "input_text.sparkx_i7_low_spool_notified", "fields": ["state"], "attribute_keys": null}, "execution_time_ms": 2.595663070678711, "success": true, "error_message": null, "response_size_bytes": 368, "user_context": null} +{"timestamp": "2026-10-15T15:06:32.040988+00:00", "tool_name": "ha_get_automation_traces", "parameters": {"automation_id": "automation.sparkx_i7_low_spool_alert", "run_id": null, "limit": 3, "deduplicate": true, "detailed": false, "sections": null, "offset": 0, "order": "newest", "ctx": "Context(_STATE_TTL_SECONDS=86400)"}, "execution_time_ms": 5.255699157714844, "success": true, "error_message": null, "response_size_bytes": 673, "user_context": null}