.ha_mcp/logs/mcp_usage.jsonl, zigbee2mqtt/state.json
This commit is contained in:
@@ -4726,3 +4726,4 @@
|
|||||||
{"timestamp": "2026-10-16T19:26:13.135994+00:00", "tool_name": "ha_config_set_helper", "parameters": {"helper_type": "template", "name": "Filament Storage Remaining", "helper_id": null, "entry_id": null, "subentry_type": null, "subentry_id": null, "show_advanced_options": false, "icon": null, "area_id": null, "labels": null, "min_value": null, "max_value": null, "step": null, "unit_of_measurement": null, "options": null, "initial": null, "mode": null, "has_date": null, "has_time": null, "restore": null, "duration": null, "monday": null, "tuesday": null, "wednesday": null, "thursday": null, "friday": null, "saturday": null, "sunday": null, "latitude": null, "longitude": null, "radius": null, "passive": null, "user_id": null, "device_trackers": null, "picture": null, "tag_id": null, "description": null, "pattern": null, "category": null, "config": {"next_step_id": "sensor", "state": "{%- set sp = states.sensor | selectattr('entity_id','match','^sensor[.]spoolman_spool_[0-9]+$') | selectattr('attributes.location','defined') | selectattr('attributes.location','eq','Storage') | selectattr('state','is_number') | map(attribute='state') | map('float',-1) | select('gt',-1) | list -%}{{ sp | sum | round(2) }}", "unit_of_measurement": "g", "device_class": "weight", "state_class": "measurement", "additional_options": {"availability": "{%- set sp = states.sensor | selectattr('entity_id','match','^sensor[.]spoolman_spool_[0-9]+$') | selectattr('attributes.location','defined') | selectattr('attributes.location','eq','Storage') | selectattr('state','is_number') | list -%}{{ sp | count > 0 }}"}}, "wait": true, "action": null, "MandatoryBPS": true, "BestPracticeKey": null}, "execution_time_ms": 198.43125343322754, "success": true, "error_message": null, "response_size_bytes": 53389, "user_context": null}
|
{"timestamp": "2026-10-16T19:26:13.135994+00:00", "tool_name": "ha_config_set_helper", "parameters": {"helper_type": "template", "name": "Filament Storage Remaining", "helper_id": null, "entry_id": null, "subentry_type": null, "subentry_id": null, "show_advanced_options": false, "icon": null, "area_id": null, "labels": null, "min_value": null, "max_value": null, "step": null, "unit_of_measurement": null, "options": null, "initial": null, "mode": null, "has_date": null, "has_time": null, "restore": null, "duration": null, "monday": null, "tuesday": null, "wednesday": null, "thursday": null, "friday": null, "saturday": null, "sunday": null, "latitude": null, "longitude": null, "radius": null, "passive": null, "user_id": null, "device_trackers": null, "picture": null, "tag_id": null, "description": null, "pattern": null, "category": null, "config": {"next_step_id": "sensor", "state": "{%- set sp = states.sensor | selectattr('entity_id','match','^sensor[.]spoolman_spool_[0-9]+$') | selectattr('attributes.location','defined') | selectattr('attributes.location','eq','Storage') | selectattr('state','is_number') | map(attribute='state') | map('float',-1) | select('gt',-1) | list -%}{{ sp | sum | round(2) }}", "unit_of_measurement": "g", "device_class": "weight", "state_class": "measurement", "additional_options": {"availability": "{%- set sp = states.sensor | selectattr('entity_id','match','^sensor[.]spoolman_spool_[0-9]+$') | selectattr('attributes.location','defined') | selectattr('attributes.location','eq','Storage') | selectattr('state','is_number') | list -%}{{ sp | count > 0 }}"}}, "wait": true, "action": null, "MandatoryBPS": true, "BestPracticeKey": null}, "execution_time_ms": 198.43125343322754, "success": true, "error_message": null, "response_size_bytes": 53389, "user_context": null}
|
||||||
{"timestamp": "2026-10-16T19:27:32.046146+00:00", "tool_name": "ha_get_state", "parameters": {"entity_id": "sensor.filament_storage_remaining", "fields": ["entity_id", "state", "attributes"], "attribute_keys": null}, "execution_time_ms": 2.190828323364258, "success": true, "error_message": null, "response_size_bytes": 568, "user_context": null}
|
{"timestamp": "2026-10-16T19:27:32.046146+00:00", "tool_name": "ha_get_state", "parameters": {"entity_id": "sensor.filament_storage_remaining", "fields": ["entity_id", "state", "attributes"], "attribute_keys": null}, "execution_time_ms": 2.190828323364258, "success": true, "error_message": null, "response_size_bytes": 568, "user_context": null}
|
||||||
{"timestamp": "2026-10-16T19:31:47.602416+00:00", "tool_name": "ha_get_state", "parameters": {"entity_id": ["sensor.spoolman_spool_10", "sensor.spoolman_spool_4", "sensor.spoolman_spool_5", "sensor.spoolman_spool_8"], "fields": ["entity_id", "state", "attributes"], "attribute_keys": ["filament_color_hex", "filament_name", "location"]}, "execution_time_ms": 1.8334388732910156, "success": true, "error_message": null, "response_size_bytes": 1187, "user_context": null}
|
{"timestamp": "2026-10-16T19:31:47.602416+00:00", "tool_name": "ha_get_state", "parameters": {"entity_id": ["sensor.spoolman_spool_10", "sensor.spoolman_spool_4", "sensor.spoolman_spool_5", "sensor.spoolman_spool_8"], "fields": ["entity_id", "state", "attributes"], "attribute_keys": ["filament_color_hex", "filament_name", "location"]}, "execution_time_ms": 1.8334388732910156, "success": true, "error_message": null, "response_size_bytes": 1187, "user_context": null}
|
||||||
|
{"timestamp": "2026-10-16T19:40:18.593041+00:00", "tool_name": "ha_eval_template", "parameters": {"template": "{%- set out = {} -%}\n{%- for s in states.sensor | selectattr('entity_id', 'match', '^sensor[.]spoolman_spool_[0-9]+$') -%}\n{%- set loc = (s.attributes.location | default('')) | trim -%}\n{%- if loc.lower().startswith('cfs lite ') -%}\n{%- set hexv = (s.attributes.filament_color_hex | default('')) | trim -%}\n{%- if hexv -%}\n{%- set _ = out.update({loc: ('#' ~ hexv if not hexv.startswith('#') else hexv)}) -%}\n{%- endif -%}\n{%- endif -%}\n{%- endfor -%}\n{{ out | tojson }}", "condition": null, "variables": null, "strict": false, "timeout": 3, "report_errors": true}, "execution_time_ms": 41.61882400512695, "success": false, "error_message": "{\n \"success\": false,\n \"error\": {\n \"code\": \"VALIDATION_FAILED\",\n \"message\": \"SecurityError: access to attribute 'update' of 'dict' object is unsafe.\",\n \"suggestion\": \"Fix the template at the reported line, if one is given, then evaluate it again\",\n \"suggestions\": [\n \"Fix the template at the reported line, if one is given, then evaluate it again\",\n \"Use default values for missing data: {{ states('sensor.temp') | float(0) }}\",\n \"Verify entity_ids exist using ha_get_state() or ha_search()\",\n \"Pass values the template expects through 'variables'\"\n ]\n },\n \"template\": \"{%- set out = {} -%}\\n{%- for s in states.sensor | selectattr('entity_id', 'match', '^sensor[.]spoolman_spool_[0-9]+$') -%}\\n{%- set loc = (s.attributes.location | default('')) | trim -%}\\n{%- if loc.lower().startswith('cfs lite ') -%}\\n{%- set hexv = (s.attributes.filament_color_hex | default('')) | trim -%}\\n{%- if hexv -%}\\n{%- set _ = out.update({loc: ('#' ~ hexv if not hexv.startswith('#') else hexv)}) -%}\\n{%- endif -%}\\n{%- endif -%}\\n{%- endfor -%}\\n{{ out | tojson }}\",\n \"line\": 7,\n \"source_line\": \"{%- set _ = out.update({loc: ('#' ~ hexv if not hexv.startswith('#') else hexv)}) -%}\"\n}", "response_size_bytes": null, "user_context": null}
|
||||||
|
|||||||
+17
-17
@@ -4,10 +4,10 @@
|
|||||||
"state": "ON",
|
"state": "ON",
|
||||||
"led_brightness": 100,
|
"led_brightness": 100,
|
||||||
"countdown_to_turn_off": 0,
|
"countdown_to_turn_off": 0,
|
||||||
"voltage": 121.3,
|
"voltage": 120.8,
|
||||||
"countdown_to_turn_on": 0,
|
"countdown_to_turn_on": 0,
|
||||||
"ac_frequency": 60,
|
"ac_frequency": 60,
|
||||||
"power_factor": 0.14,
|
"power_factor": 0.11,
|
||||||
"update": {
|
"update": {
|
||||||
"state": "idle",
|
"state": "idle",
|
||||||
"installed_version": 268513381,
|
"installed_version": 268513381,
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"led_brightness": 100,
|
"led_brightness": 100,
|
||||||
"countdown_to_turn_off": 0,
|
"countdown_to_turn_off": 0,
|
||||||
"countdown_to_turn_on": 0,
|
"countdown_to_turn_on": 0,
|
||||||
"power": 2.3,
|
"power": 2,
|
||||||
"current": 0.1,
|
"current": 0.1,
|
||||||
"energy": 57.31,
|
"energy": 57.31,
|
||||||
"power_factor": 0.2,
|
"power_factor": 0.2,
|
||||||
@@ -45,9 +45,9 @@
|
|||||||
"state": "ON",
|
"state": "ON",
|
||||||
"led_brightness": 100,
|
"led_brightness": 100,
|
||||||
"countdown_to_turn_off": 0,
|
"countdown_to_turn_off": 0,
|
||||||
"voltage": 120.3,
|
"voltage": 119.5,
|
||||||
"countdown_to_turn_on": 0,
|
"countdown_to_turn_on": 0,
|
||||||
"energy": 110.68,
|
"energy": 110.69,
|
||||||
"power_factor": 0.2,
|
"power_factor": 0.2,
|
||||||
"ac_frequency": 60,
|
"ac_frequency": 60,
|
||||||
"update": {
|
"update": {
|
||||||
@@ -58,8 +58,8 @@
|
|||||||
"latest_release_notes": null
|
"latest_release_notes": null
|
||||||
},
|
},
|
||||||
"linkquality": 145,
|
"linkquality": 145,
|
||||||
"power": 0.2,
|
"power": 85.2,
|
||||||
"current": 0.01,
|
"current": 0.79,
|
||||||
"power_on_behavior": "on"
|
"power_on_behavior": "on"
|
||||||
},
|
},
|
||||||
"0xb40e060fffe031e3": {
|
"0xb40e060fffe031e3": {
|
||||||
@@ -74,11 +74,11 @@
|
|||||||
"led_brightness": 100,
|
"led_brightness": 100,
|
||||||
"countdown_to_turn_off": 0,
|
"countdown_to_turn_off": 0,
|
||||||
"countdown_to_turn_on": 0,
|
"countdown_to_turn_on": 0,
|
||||||
"voltage": 119.2,
|
"voltage": 118.8,
|
||||||
"state": "ON",
|
"state": "ON",
|
||||||
"ac_frequency": 60,
|
"ac_frequency": 60,
|
||||||
"energy": 224.68,
|
"energy": 224.7,
|
||||||
"power": 100.7,
|
"power": 95.2,
|
||||||
"current": 0.91,
|
"current": 0.91,
|
||||||
"power_factor": 0.95,
|
"power_factor": 0.95,
|
||||||
"update": {
|
"update": {
|
||||||
@@ -95,13 +95,13 @@
|
|||||||
"led_brightness": 100,
|
"led_brightness": 100,
|
||||||
"countdown_to_turn_off": 0,
|
"countdown_to_turn_off": 0,
|
||||||
"countdown_to_turn_on": 0,
|
"countdown_to_turn_on": 0,
|
||||||
"voltage": 120.8,
|
"voltage": 120.4,
|
||||||
"energy": 105.66,
|
"energy": 105.67,
|
||||||
"state": "ON",
|
"state": "ON",
|
||||||
"power": 56.5,
|
"power": 66.4,
|
||||||
"current": 0.59,
|
"current": 0.81,
|
||||||
"ac_frequency": 60,
|
"ac_frequency": 60,
|
||||||
"power_factor": 0.78,
|
"power_factor": 0.85,
|
||||||
"update": {
|
"update": {
|
||||||
"state": "idle",
|
"state": "idle",
|
||||||
"installed_version": 268513381,
|
"installed_version": 268513381,
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
"energy": 15.42,
|
"energy": 15.42,
|
||||||
"current": 0.02,
|
"current": 0.02,
|
||||||
"power": 1.1,
|
"power": 1.1,
|
||||||
"power_factor": 0.11,
|
"power_factor": 0.22,
|
||||||
"linkquality": 116,
|
"linkquality": 116,
|
||||||
"update": {
|
"update": {
|
||||||
"state": "idle",
|
"state": "idle",
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
"0xffffb40e0608864e": {
|
"0xffffb40e0608864e": {
|
||||||
"led_brightness": 100,
|
"led_brightness": 100,
|
||||||
"countdown_to_turn_off": 0,
|
"countdown_to_turn_off": 0,
|
||||||
"voltage": 121,
|
"voltage": 120.8,
|
||||||
"energy": 39.11,
|
"energy": 39.11,
|
||||||
"countdown_to_turn_on": 0,
|
"countdown_to_turn_on": 0,
|
||||||
"state": "ON",
|
"state": "ON",
|
||||||
|
|||||||
Reference in New Issue
Block a user