diff --git a/.ha_mcp/logs/mcp_usage.jsonl b/.ha_mcp/logs/mcp_usage.jsonl index 47acbf45..53488c98 100644 --- a/.ha_mcp/logs/mcp_usage.jsonl +++ b/.ha_mcp/logs/mcp_usage.jsonl @@ -4509,3 +4509,4 @@ {"timestamp": "2026-10-14T17:18:46.767372+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "gcm={{ states('input_number.sparkx_i7_filament_g_cm') }}\nlength_cm={{ states('sensor.sparkx_i7_expected_material_length') }}\nweight_g={{ states('sensor.sparkx_i7_expected_material_weight') }}\njob_g={{ (states('sensor.sparkx_i7_expected_material_length') | float(0) * states('input_number.sparkx_i7_filament_g_cm') | float(0.0298)) | round(1) }}\ncolor_attr={{ state_attr('sensor.sparkx_i7_expected_material_length','color') }}\ngcol={{ state_attr('sensor.sparkx_i7_expected_material_length','color') | default('', true) | string | replace('#','') | lower }}\nmaterial={{ state_attr('sensor.sparkx_i7_expected_material_length','material') }}\n{% for n in ['1','2','3','4'] %}slot{{ n }}: color={{ states('sensor.sparkx_i7_cfs_box_1_slot_' ~ n ~ '_color') }} name={{ states('sensor.sparkx_i7_slot_' ~ n ~ '_color_name') }}\n{% endfor %}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 124.2532730102539, "success": true, "error_message": null, "response_size_bytes": 1656, "user_context": null} {"timestamp": "2026-10-14T17:19:21.685863+00:00", "tool_name": "ha_get_state", "parameters": {"entity_id": ["sensor.sparkx_i7_used_material_length", "sensor.sparkx_i7_print_progress", "sensor.sparkx_i7_expected_material_length", "sensor.sparkx_i7_expected_material_weight", "sensor.sparkx_i7_filament_weight_estimated", "sensor.sparkx_i7_print_status"], "fields": ["entity_id", "state"], "attribute_keys": null}, "execution_time_ms": 53.678035736083984, "success": true, "error_message": null, "response_size_bytes": 1083, "user_context": null} {"timestamp": "2026-10-14T17:19:22.517088+00:00", "tool_name": "ha_config_get_automation", "parameters": {"identifier": "1791477238799"}, "execution_time_ms": 960.4289531707764, "success": true, "error_message": null, "response_size_bytes": 4606, "user_context": null} +{"timestamp": "2026-10-14T17:23:05.053756+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 used_g = (states('sensor.sparkx_i7_used_material_length') | float(0)) * gcm %}\n{% set job_g = (((weight_g) if weight_g > 0 else (length_cm * gcm)) | round(1)) %}\n{% set gn = namespace(cl=[]) %}\n{% for x in (state_attr('sensor.sparkx_i7_expected_material_length','color') | default('', true) | string).replace('#','').split(';') %}{% if x | trim | lower not in ['', 'none', 'unknown', 'unavailable'] %}{% set gn.cl = gn.cl + [x | trim | lower] %}{% endif %}{% endfor %}\n{% set gcols = gn.cl %}\n{% set mn = namespace(ml=[]) %}\n{% for x in (state_attr('sensor.sparkx_i7_expected_material_length','material') | default('', true) | string).split(';') %}{% if x | trim not in ['', 'none', 'unknown', 'unavailable'] %}{% set mn.ml = mn.ml + [x | trim] %}{% endif %}{% endfor %}\n{% set mats = mn.ml %}\n{% set gfile = state_attr('sensor.sparkx_i7_expected_material_length','gcode_file') | default('', true) | string %}\n{% set single = (gcols | length) == 1 %}\n{% set used = used_g | round(1) %}\n{% set remain = ([(job_g - used_g), 0] | max) | round(1) %}\n{% set ns = namespace(req=[], short=[], missing=[], loaded=[], avail=0, cover=[], nocover=[]) %}\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 per_slot = gcols[0] if (single and gcols[0] in cols.list) else '' %}\n{% set mono_offline = single and gcols[0] not in cols.list %}\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, base=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] %}{% set sp.rem = states(e[:-10]) | float(0) %}{% set sp.base = state_attr(e[:-10],'filament_weight') | float(0) %}\n{% endif %}\n{% endfor %}\n{% set pct = ((sp.rem / sp.base * 100) | round(0) | int) if sp.base > 0 else 0 %}\n{% set amt = (sp.rem | round(1)) ~ ' g (' ~ pct ~ '%)' %}\n{% if sp.id != '' %}\n{% set ns.avail = ns.avail + sp.rem %}\n{% set ns.loaded = ns.loaded + [label ~ ': ' ~ amt] %}\n{% if job_g > 0 %}{% if sp.rem >= job_g %}{% set ns.cover = ns.cover + [label ~ ': ' ~ amt] %}{% else %}{% set ns.nocover = ns.nocover + [label ~ ': ' ~ amt] %}{% endif %}{% endif %}\n{% endif %}\n{% if job_g > 0 %}\n{% set req = job_g if (per_slot == '' or c == per_slot) else 0 %}\n{% if req > 0 %}\n{% if sp.id == '' %}{% set ns.missing = ns.missing + [label ~ ' (#' ~ (c | upper) ~ ')'] %}\n{% elif sp.rem < req %}{% set ns.short = ns.short + [label ~ ': ' ~ amt ~ ' left, up to ' ~ req ~ ' g needed'] %}\n{% else %}{% set ns.req = ns.req + [label ~ ': ' ~ amt ~ ' left, up to ' ~ req ~ ' g needed'] %}{% endif %}\n{% endif %}\n{% endif %}\n{% endif %}\n{% endfor %}\n{% set gc = namespace(s='') %}{% for cc in gcols %}{% set gc.s = gc.s ~ '#' ~ (cc | upper) ~ (' ' if not loop.last else '') %}{% endfor %}\n{% set head %}Job: {{ gfile if gfile else 'unknown' }}\nNeeds {{ job_g }} g{% if length_cm > 0 %} ({{ length_cm }} cm){% endif %} · used {{ used }} g · {{ remain }} g left to print\nSlicer: {{ (mats | join('+')) if mats else 'unknown' }}{% if gcols %} · {{ 'single colour ' if single else ((gcols | length) ~ ' colours ') }}{{ gc.s }}{% endif %}{% endset %}\n{{ head }}\n{% if job_g <= 0 %}Cannot verify: slicer filament estimate not available yet.{% if ns.loaded %}\nLoaded: {{ ns.loaded | join('; ') }}.{% endif %}\n{% elif mono_offline %}No exact colour match for the print colour {{ gc.s }} in a loaded CFS slot, so the spool cannot be identified. Needs {{ job_g }} g.\n{% if ns.cover %}Could cover it: {{ ns.cover | join('; ') }}{% endif %}{% if ns.nocover %}{% if ns.cover %}\nToo small: {{ ns.nocover | join('; ') }}{% else %}Not enough: {{ ns.nocover | join('; ') }}{% endif %}{% endif %}{% if ns.missing %}\nNo Spoolman spool matched for: {{ ns.missing | join(', ') }}{% endif %}\n{% elif ns.short %}NOT ENOUGH filament - possible shortfall:\n{{ ns.short | join('\\n') }}{% if ns.req %}\nOK: {{ ns.req | join('; ') }}{% endif %}{% if ns.missing %}\nNo Spoolman spool matched for: {{ ns.missing | join(', ') }}{% endif %}\n{% elif ns.req %}Enough filament:\n{{ ns.req | join('\\n') }}{% if ns.missing %}\nNo Spoolman spool matched for: {{ ns.missing | join(', ') }}{% endif %}\n{% else %}Cannot verify: could not match this job's filament to a loaded CFS slot.\nLoaded: {{ ns.loaded | join('; ') }}{% endif %}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 1385.2384090423584, "success": true, "error_message": null, "response_size_bytes": 6916, "user_context": null} diff --git a/zigbee2mqtt/state.json b/zigbee2mqtt/state.json index 52edbcb6..089665cb 100644 --- a/zigbee2mqtt/state.json +++ b/zigbee2mqtt/state.json @@ -4,7 +4,7 @@ "state": "ON", "led_brightness": 100, "countdown_to_turn_off": 0, - "voltage": 119, + "voltage": 118.5, "countdown_to_turn_on": 0, "ac_frequency": 60, "power_factor": 0.11, @@ -27,7 +27,7 @@ "led_brightness": 100, "countdown_to_turn_off": 0, "countdown_to_turn_on": 0, - "power": 2, + "power": 2.1, "current": 0.09, "energy": 56.31, "power_factor": 0.18, @@ -47,7 +47,7 @@ "countdown_to_turn_off": 0, "voltage": 118.3, "countdown_to_turn_on": 0, - "energy": 108.84, + "energy": 108.85, "power_factor": 0.9, "ac_frequency": 60, "update": { @@ -58,7 +58,7 @@ "latest_release_notes": null }, "linkquality": 145, - "power": 85.2, + "power": 85.5, "current": 0.79, "power_on_behavior": "on" }, @@ -80,7 +80,7 @@ "energy": 221.04, "power": 93.6, "current": 0.86, - "power_factor": 0.66, + "power_factor": 0.39, "update": { "state": "idle", "installed_version": 268513381, @@ -98,7 +98,7 @@ "voltage": 118.8, "energy": 103.61, "state": "ON", - "power": 29.4, + "power": 30, "current": 0.44, "ac_frequency": 60, "power_factor": 0.57,