From bac81fd7cd074888b545bf2f7c4fea8043ee3f44 Mon Sep 17 00:00:00 2001 From: Home Assistant Version Control Date: Wed, 14 Oct 2026 17:28:07 +0000 Subject: [PATCH] .ha_mcp/logs/mcp_usage.jsonl, zigbee2mqtt/state.json --- .ha_mcp/logs/mcp_usage.jsonl | 1 + zigbee2mqtt/state.json | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.ha_mcp/logs/mcp_usage.jsonl b/.ha_mcp/logs/mcp_usage.jsonl index 163e0a2f..82735f90 100644 --- a/.ha_mcp/logs/mcp_usage.jsonl +++ b/.ha_mcp/logs/mcp_usage.jsonl @@ -4516,3 +4516,4 @@ {"timestamp": "2026-10-14T17:26:23.302209+00:00", "tool_name": "ha_get_state", "parameters": {"entity_id": ["sensor.sparkx_i7_used_material_length", "input_number.sparkx_i7_filament_g_cm"], "fields": null, "attribute_keys": null}, "execution_time_ms": 277.26006507873535, "success": true, "error_message": null, "response_size_bytes": 1492, "user_context": null} {"timestamp": "2026-10-14T17:26:23.312346+00:00", "tool_name": "ha_search", "parameters": {"query": "sparkx i7", "domain_filter": "sensor", "area_filter": null, "search_types": null, "limit": 25, "offset": 0, "exact_match": true, "include_hidden": true, "include_config": false, "group_by_domain": false, "per_domain_limit": null, "state_filter": null, "result_fields": null, "fields": null, "config_time_budget": null, "ctx": {"_STATE_TTL_SECONDS": 86400}}, "execution_time_ms": 287.71471977233887, "success": true, "error_message": null, "response_size_bytes": 5499, "user_context": null} {"timestamp": "2026-10-14T17:26:36.469324+00:00", "tool_name": "ha_get_state", "parameters": {"entity_id": ["sensor.spoolman_spool_3", "sensor.sparkx_i7_slot_1_color_name", "sensor.sparkx_i7_slot_3_color_name"], "fields": null, "attribute_keys": null}, "execution_time_ms": 31.878948211669922, "success": true, "error_message": null, "response_size_bytes": 2723, "user_context": null} +{"timestamp": "2026-10-14T17:27:58.539833+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298) %}\n{% set length_cm = states('sensor.sparkx_i7_expected_material_length') | float(0) %}\n{% set weight_g = states('sensor.sparkx_i7_expected_material_weight') | float(0) %}\n{% set job_g = ((weight_g | float) if (weight_g | float) > 0 else (length_cm | float) * (gcm | float)) | round(1) %}\n{% set used_len = states('sensor.sparkx_i7_used_material_length') | float(0) %}\n{% set used_g = (((used_len | float) * (gcm | float)) | round(1)) %}\n{% set gcode_file = state_attr('sensor.sparkx_i7_expected_material_length', 'gcode_file') | default('', true) %}\n{% set cols = namespace(list=[]) %}\n{% for n in ['1','2','3','4'] %}{% set cc = states('sensor.sparkx_i7_cfs_box_1_slot_' ~ n ~ '_color') | replace('#','') | lower %}{% if cc not in ['','none','unknown','unavailable'] %}{% set cols.list = cols.list + [cc] %}{% endif %}{% endfor %}\n{% set gc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','color') | default('', true) | string).split(';') %}{% set q = p | replace('#','') | lower | trim %}{% if q not in ['','none','unknown','unavailable'] %}{% set gc.list = gc.list + [q] %}{% endif %}{% endfor %}\n{% set mc = namespace(list=[]) %}\n{% for p in (state_attr('sensor.sparkx_i7_expected_material_length','material') | default('', true) | string).split(';') %}{% set q = p | trim %}{% if q not in ['','none','unknown','unavailable'] %}{% set mc.list = mc.list + [q] %}{% endif %}{% endfor %}\n{% set single = (gc.list | length) == 1 %}\n{% set gcol = gc.list[0] if single else '' %}\n{% set rem_g = ([((job_g | float) - (used_g | float)), 0] | max) | round(1) %}\n{% set ns = namespace(cover=[], below=[], short=[], ok=[], missing=[], loaded=[], match_label='', match_rem=0) %}\n{% for n in ['1','2','3','4'] %}\n{% set c = states('sensor.sparkx_i7_cfs_box_1_slot_' ~ n ~ '_color') | replace('#','') | lower %}\n{% if c not in ['','none','unknown','unavailable'] %}\n{% set cname = states('sensor.sparkx_i7_slot_' ~ n ~ '_color_name') %}\n{% set flabel = states('sensor.sparkx_i7_cfs_box_1_slot_' ~ n ~ '_filament') %}\n{% set label = 'Slot ' ~ n ~ ' ' ~ (cname if cname not in ['','unknown','unavailable'] else (flabel if flabel not in ['','unknown','unavailable'] else ('#' ~ (c | upper)))) %}\n{% set sp = namespace(id='', rem=0, fw=0) %}\n{% for e in integration_entities('spoolman') if e.endswith('_color_hex') %}\n{% if sp.id == '' and (states(e) | replace('#','') | lower) == c and (state_attr(e[:-10],'location') | default('', true) | lower) == 'cfs lite' %}\n{% set sp.id = e[:-10] %}\n{% set sp.rem = states(e[:-10]) | float(0) %}\n{% set sp.fw = state_attr(e[:-10],'filament_weight') | float(0) %}\n{% endif %}\n{% endfor %}\n{% set pct = ((((sp.rem | float) / (sp.fw | float)) * 100) | round(0) | int) if (sp.fw | float) > 0 else 0 %}\n{% if sp.id != '' %}{% set ns.loaded = ns.loaded + [label ~ ': ' ~ (sp.rem | round(1)) ~ ' g (' ~ pct ~ '%)'] %}{% endif %}\n{% if sp.id != '' and single and c == gcol %}{% set ns.match_label = label %}{% set ns.match_rem = sp.rem %}{% endif %}\n{% if sp.id != '' %}\n{% if single and c == gcol %}\n{% if (sp.rem | float) < (job_g | float) %}{% set ns.short = ns.short + [label ~ ': ' ~ (sp.rem | round(1)) ~ ' g (' ~ pct ~ '%) left, ' ~ job_g ~ ' g needed'] %}\n{% else %}{% set ns.ok = ns.ok + [label ~ ': ' ~ (sp.rem | round(1)) ~ ' g (' ~ pct ~ '%) left, ' ~ job_g ~ ' g needed'] %}{% endif %}\n{% elif single %}\n{% if (sp.rem | float) >= (job_g | float) %}{% set ns.cover = ns.cover + [label ~ ': ' ~ (sp.rem | round(1)) ~ ' g (' ~ pct ~ '%)'] %}\n{% else %}{% set ns.below = ns.below + [label ~ ': ' ~ (sp.rem | round(1)) ~ ' g (' ~ pct ~ '%)'] %}{% endif %}\n{% else %}\n{% if (sp.rem | float) < (job_g | float) %}{% set ns.short = ns.short + [label ~ ': ' ~ (sp.rem | round(1)) ~ ' g (' ~ pct ~ '%) left, up to ' ~ job_g ~ ' g needed'] %}\n{% else %}{% set ns.ok = ns.ok + [label ~ ': ' ~ (sp.rem | round(1)) ~ ' g (' ~ pct ~ '%) left, up to ' ~ job_g ~ ' g needed'] %}{% endif %}\n{% endif %}\n{% elif job_g > 0 %}\n{% set ns.missing = ns.missing + [label ~ ' (#' ~ (c | upper) ~ ')'] %}\n{% endif %}\n{% endif %}\n{% endfor %}\nJob: {{ gcode_file if gcode_file not in ['','unknown','unavailable'] else (state_attr('sensor.sparkx_i7_print_status','file') | default('', true) | string).split('/')[-1] }}\nNeeds {{ job_g | round(1) }} g ({{ length_cm | round(1) }} cm) · used {{ used_g }} g · {{ rem_g }} g left to print\nSlicer: {{ (mc.list | join(', ')) if mc.list else 'material unknown' }} · {{ ('single colour #' ~ (gcol | upper)) if single else ((gc.list | length) ~ ' colours') }}\n{% if job_g <= 0 %}Cannot verify: slicer filament estimate not available yet.{% if ns.loaded %} Loaded: {{ ns.loaded | join('; ') }}.{% endif %}\n{% elif single and gcol in cols.list %}\n{% if ns.short %}NOT ENOUGH filament:\n{{ ns.short | join('\\n') }}\n{% elif ns.match_label %}Enough filament: {{ ns.match_label }}: {{ ns.match_rem | round(1) }} g left, {{ job_g }} g needed.\n{% else %}Matched slot {{ gcol | upper }} has no Spoolman spool at CFS Lite, so remaining cannot be checked.{% endif %}\n{% elif single %}No exact colour match for the print colour #{{ gcol | upper }} in a loaded CFS slot, so the exact spool cannot be identified.{% if ns.cover %}\nWould cover {{ job_g }} g: {{ ns.cover | join('; ') }}{% endif %}{% if ns.below %}\nBelow {{ job_g }} g: {{ ns.below | join('; ') }}{% endif %}{% if not ns.cover and not ns.below %}\nNo loaded CFS slot has a matching Spoolman spool to compare.{% endif %}\n{% elif ns.short %}NOT ENOUGH filament - possible shortfall:\n{{ ns.short | join('\\n') }}{% if ns.ok %}\nOK (would still cover the whole job): {{ ns.ok | join('; ') }}{% endif %}{% if ns.missing %}\nNo Spoolman spool matched for: {{ ns.missing | join(', ') }}{% endif %}\n{% elif ns.ok %}Enough filament:\n{{ ns.ok | join('\\n') }}{% if ns.missing %}\nNo Spoolman spool matched for: {{ ns.missing | join(', ') }}{% endif %}\n{% elif ns.missing %}Could not match any loaded CFS slot to a Spoolman spool.{% endif %}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 2405.003547668457, "success": true, "error_message": null, "response_size_bytes": 7639, "user_context": null} diff --git a/zigbee2mqtt/state.json b/zigbee2mqtt/state.json index 089665cb..9ea5edad 100644 --- a/zigbee2mqtt/state.json +++ b/zigbee2mqtt/state.json @@ -4,7 +4,7 @@ "state": "ON", "led_brightness": 100, "countdown_to_turn_off": 0, - "voltage": 118.5, + "voltage": 119, "countdown_to_turn_on": 0, "ac_frequency": 60, "power_factor": 0.11, @@ -27,8 +27,8 @@ "led_brightness": 100, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, - "power": 2.1, - "current": 0.09, + "power": 2.2, + "current": 0.1, "energy": 56.31, "power_factor": 0.18, "update": { @@ -45,10 +45,10 @@ "state": "ON", "led_brightness": 100, "countdown_to_turn_off": 0, - "voltage": 118.3, + "voltage": 118.8, "countdown_to_turn_on": 0, "energy": 108.85, - "power_factor": 0.9, + "power_factor": 0.31, "ac_frequency": 60, "update": { "state": "idle", @@ -58,8 +58,8 @@ "latest_release_notes": null }, "linkquality": 145, - "power": 85.5, - "current": 0.79, + "power": 0.2, + "current": 0.01, "power_on_behavior": "on" }, "0xb40e060fffe031e3": { @@ -74,13 +74,13 @@ "led_brightness": 100, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, - "voltage": 117.6, + "voltage": 118.1, "state": "ON", "ac_frequency": 60, "energy": 221.04, "power": 93.6, "current": 0.86, - "power_factor": 0.39, + "power_factor": 0.36, "update": { "state": "idle", "installed_version": 268513381, @@ -98,7 +98,7 @@ "voltage": 118.8, "energy": 103.61, "state": "ON", - "power": 30, + "power": 29.8, "current": 0.44, "ac_frequency": 60, "power_factor": 0.57, @@ -119,7 +119,7 @@ "energy": 15.19, "current": 0.01, "power": 0.1, - "power_factor": 0.11, + "power_factor": 0.22, "linkquality": 116, "update": { "state": "idle", @@ -136,14 +136,14 @@ "0xffffb40e0608864e": { "led_brightness": 100, "countdown_to_turn_off": 0, - "voltage": 119.3, + "voltage": 119.8, "energy": 36.92, "countdown_to_turn_on": 0, "state": "ON", "current": 0.02, "ac_frequency": 60, "power": 0.3, - "power_factor": 0.19, + "power_factor": 0.2, "update": { "state": "idle", "installed_version": 268513381,