.ha_mcp/logs/mcp_usage.jsonl, zigbee2mqtt/state.json
This commit is contained in:
@@ -4653,3 +4653,4 @@
|
||||
{"timestamp": "2026-10-15T17:24:27.113443+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": null, "include_config": true, "include_screenshot": false, "view_path": null, "query": "Filament Sufficiency", "describe": false}, "execution_time_ms": 3.5462379455566406, "success": true, "error_message": null, "response_size_bytes": 8686, "user_context": null}
|
||||
{"timestamp": "2026-10-15T17:36:19.735221+00:00", "tool_name": "ha_get_state", "parameters": {"entity_id": ["sensor.sparkx_i7_print_status", "sensor.sparkx_i7_expected_material_length", "sensor.sparkx_i7_used_material_length", "sensor.sparkx_i7_active_filament_slot", "sensor.sparkx_i7_filament_weight_estimated", "input_number.sparkx_i7_filament_g_cm"], "fields": ["entity_id", "state", "attributes"], "attribute_keys": null}, "execution_time_ms": 3.3178329467773438, "success": true, "error_message": null, "response_size_bytes": 2550, "user_context": null}
|
||||
{"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}
|
||||
|
||||
+11
-11
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"0xffffb40e0607ace4": {
|
||||
"energy": 24.52,
|
||||
"energy": 24.53,
|
||||
"state": "ON",
|
||||
"led_brightness": 100,
|
||||
"countdown_to_turn_off": 0,
|
||||
"voltage": 120.4,
|
||||
"voltage": 119.8,
|
||||
"countdown_to_turn_on": 0,
|
||||
"ac_frequency": 60,
|
||||
"power_factor": 0.14,
|
||||
@@ -47,7 +47,7 @@
|
||||
"countdown_to_turn_off": 0,
|
||||
"voltage": 119.3,
|
||||
"countdown_to_turn_on": 0,
|
||||
"energy": 109.72,
|
||||
"energy": 109.73,
|
||||
"power_factor": 0.94,
|
||||
"ac_frequency": 60,
|
||||
"update": {
|
||||
@@ -58,8 +58,8 @@
|
||||
"latest_release_notes": null
|
||||
},
|
||||
"linkquality": 145,
|
||||
"power": 97.6,
|
||||
"current": 0.94,
|
||||
"power": 94.4,
|
||||
"current": 0.89,
|
||||
"power_on_behavior": "on"
|
||||
},
|
||||
"0xb40e060fffe031e3": {
|
||||
@@ -95,13 +95,13 @@
|
||||
"led_brightness": 100,
|
||||
"countdown_to_turn_off": 0,
|
||||
"countdown_to_turn_on": 0,
|
||||
"voltage": 119.8,
|
||||
"voltage": 119.3,
|
||||
"energy": 104.35,
|
||||
"state": "ON",
|
||||
"power": 57.8,
|
||||
"current": 0.5,
|
||||
"power": 42.6,
|
||||
"current": 0.47,
|
||||
"ac_frequency": 60,
|
||||
"power_factor": 0.75,
|
||||
"power_factor": 0.76,
|
||||
"update": {
|
||||
"state": "idle",
|
||||
"installed_version": 268513381,
|
||||
@@ -119,7 +119,7 @@
|
||||
"energy": 15.31,
|
||||
"current": 0.01,
|
||||
"power": 0.1,
|
||||
"power_factor": 0.22,
|
||||
"power_factor": 0.11,
|
||||
"linkquality": 116,
|
||||
"update": {
|
||||
"state": "idle",
|
||||
@@ -171,7 +171,7 @@
|
||||
},
|
||||
"0xa4c1380d0679ffff": {
|
||||
"battery": 100,
|
||||
"temperature": 11.4,
|
||||
"temperature": 11.6,
|
||||
"temperature_units": "celsius",
|
||||
"temperature_calibration": 0,
|
||||
"update": {
|
||||
|
||||
Reference in New Issue
Block a user