.ha_mcp/logs/mcp_usage.jsonl

This commit is contained in:
Home Assistant Version Control
2026-08-26 04:30:16 +00:00
parent e219704a53
commit f6c9910d31
+2
View File
@@ -2134,3 +2134,5 @@
{"timestamp": "2026-08-26T04:27:19.220695+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.office_test_meeting_status_light", "python_transform": "\ndef r(o, m):\n if isinstance(o, dict): return {r(k,m):r(v,m) for k,v in o.items()}\n if isinstance(o, list): return [r(i,m) for i in o]\n if isinstance(o, str):\n for k,v in m.items(): o=o.replace(k,v)\n return o\nm={\"sensor.night_light_illuminance\":\"sensor.night_light_illuminance_2\",\"binary_sensor.night_light_occupancy\":\"binary_sensor.night_light_occupancy_2\",\"sensor.bedroom_switch_battery\":\"sensor.bedroom_switch_battery_2\",\"light.bedroom_lamp\":\"light.bedroom_lamp_2\",\"light.office_lamp\":\"light.office_lamp_2\",\"light.night_light\":\"light.night_light_2\"}\nfor k in [\"triggers\",\"actions\",\"conditions\",\"variables\"]: \n if k in config: config[k]=r(config[k],m)\n", "config_hash": "e248161a8b4445ed", "category": null, "wait": true, "MandatoryBPS": true, "BestPracticeKey": null}, "execution_time_ms": 71.43974304199219, "success": false, "error_message": "{\n \"success\": false,\n \"error\": {\n \"code\": \"VALIDATION_FAILED\",\n \"message\": \"Expression validation failed: Forbidden node type: FunctionDef \\u2014 use a list comprehension or inline the logic\",\n \"suggestion\": \"Check expression syntax\",\n \"suggestions\": [\n \"Check expression syntax\",\n \"Ensure only allowed operations are used\",\n \"See tool description for allowed operations\",\n \"Expression: \\ndef r(o, m):\\n if isinstance(o, dict): return {r(k,m):r(v,m) for k,v in o.items()}\\n if isinstance(o,...\",\n \"For Home Assistant best-practice guidance, call ha_get_skill_guide(skill='home-assistant-best-practices') and consult the relevant reference file before retrying.\"\n ]\n },\n \"action\": \"python_transform\",\n \"identifier\": \"automation.office_test_meeting_status_light\"\n}", "response_size_bytes": null, "user_context": null}
{"timestamp": "2026-08-26T04:27:23.641289+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.office_lamp_and_lights_control", "python_transform": "\ndef r(o, m):\n if isinstance(o, dict): return {r(k,m):r(v,m) for k,v in o.items()}\n if isinstance(o, list): return [r(i,m) for i in o]\n if isinstance(o, str):\n for k,v in m.items(): o=o.replace(k,v)\n return o\nm={\"sensor.night_light_illuminance\":\"sensor.night_light_illuminance_2\",\"binary_sensor.night_light_occupancy\":\"binary_sensor.night_light_occupancy_2\",\"sensor.bedroom_switch_battery\":\"sensor.bedroom_switch_battery_2\",\"light.bedroom_lamp\":\"light.bedroom_lamp_2\",\"light.office_lamp\":\"light.office_lamp_2\",\"light.night_light\":\"light.night_light_2\"}\nfor k in [\"triggers\",\"actions\",\"conditions\",\"variables\"]: \n if k in config: config[k]=r(config[k],m)\n", "config_hash": "96c25121db475c01", "category": null, "wait": true, "MandatoryBPS": true, "BestPracticeKey": null}, "execution_time_ms": 105.1630973815918, "success": false, "error_message": "{\n \"success\": false,\n \"error\": {\n \"code\": \"VALIDATION_FAILED\",\n \"message\": \"Expression validation failed: Forbidden node type: FunctionDef \\u2014 use a list comprehension or inline the logic\",\n \"suggestion\": \"Check expression syntax\",\n \"suggestions\": [\n \"Check expression syntax\",\n \"Ensure only allowed operations are used\",\n \"See tool description for allowed operations\",\n \"Expression: \\ndef r(o, m):\\n if isinstance(o, dict): return {r(k,m):r(v,m) for k,v in o.items()}\\n if isinstance(o,...\",\n \"For Home Assistant best-practice guidance, call ha_get_skill_guide(skill='home-assistant-best-practices') and consult the relevant reference file before retrying.\"\n ]\n },\n \"action\": \"python_transform\",\n \"identifier\": \"automation.office_lamp_and_lights_control\"\n}", "response_size_bytes": null, "user_context": null}
{"timestamp": "2026-08-26T04:27:28.199665+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.ikea_bilresa_e2489_dual_button_matter", "python_transform": "\ndef r(o, m):\n if isinstance(o, dict): return {r(k,m):r(v,m) for k,v in o.items()}\n if isinstance(o, list): return [r(i,m) for i in o]\n if isinstance(o, str):\n for k,v in m.items(): o=o.replace(k,v)\n return o\nm={\"sensor.night_light_illuminance\":\"sensor.night_light_illuminance_2\",\"binary_sensor.night_light_occupancy\":\"binary_sensor.night_light_occupancy_2\",\"sensor.bedroom_switch_battery\":\"sensor.bedroom_switch_battery_2\",\"light.bedroom_lamp\":\"light.bedroom_lamp_2\",\"light.office_lamp\":\"light.office_lamp_2\",\"light.night_light\":\"light.night_light_2\"}\nfor k in [\"triggers\",\"actions\",\"conditions\",\"variables\"]: \n if k in config: config[k]=r(config[k],m)\n", "config_hash": "b555305cee4669b9", "category": null, "wait": true, "MandatoryBPS": true, "BestPracticeKey": null}, "execution_time_ms": 55.20176887512207, "success": false, "error_message": "{\n \"success\": false,\n \"error\": {\n \"code\": \"VALIDATION_FAILED\",\n \"message\": \"Expression validation failed: Forbidden node type: FunctionDef \\u2014 use a list comprehension or inline the logic\",\n \"suggestion\": \"Check expression syntax\",\n \"suggestions\": [\n \"Check expression syntax\",\n \"Ensure only allowed operations are used\",\n \"See tool description for allowed operations\",\n \"Expression: \\ndef r(o, m):\\n if isinstance(o, dict): return {r(k,m):r(v,m) for k,v in o.items()}\\n if isinstance(o,...\",\n \"For Home Assistant best-practice guidance, call ha_get_skill_guide(skill='home-assistant-best-practices') and consult the relevant reference file before retrying.\"\n ]\n },\n \"action\": \"python_transform\",\n \"identifier\": \"automation.ikea_bilresa_e2489_dual_button_matter\"\n}", "response_size_bytes": null, "user_context": null}
{"timestamp": "2026-08-26T04:30:07.666010+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.alert_thread_node_offline", "python_transform": "config.update(json.loads(json.dumps(config).replace('sensor.night_light_illuminance','sensor.night_light_illuminance_2').replace('binary_sensor.night_light_occupancy','binary_sensor.night_light_occupancy_2').replace('sensor.bedroom_switch_battery','sensor.bedroom_switch_battery_2').replace('light.bedroom_lamp','light.bedroom_lamp_2').replace('light.office_lamp','light.office_lamp_2').replace('light.night_light','light.night_light_2')))", "config_hash": "ed171d2737dbee8d", "category": null, "wait": true, "MandatoryBPS": true, "BestPracticeKey": null}, "execution_time_ms": 189.46218490600586, "success": false, "error_message": "{\n \"success\": false,\n \"error\": {\n \"code\": \"VALIDATION_FAILED\",\n \"message\": \"Expression validation failed: Forbidden method: loads (allowed: append, clear, count, endswith, extend, get, index, insert, items, join, keys, lower, pop, remove, replace, reverse, setdefault, sort, split, startswith, strip, update, upper, values)\",\n \"suggestion\": \"Check expression syntax\",\n \"suggestions\": [\n \"Check expression syntax\",\n \"Ensure only allowed operations are used\",\n \"See tool description for allowed operations\",\n \"Expression: config.update(json.loads(json.dumps(config).replace('sensor.night_light_illuminance','sensor.night_l...\",\n \"For Home Assistant best-practice guidance, call ha_get_skill_guide(skill='home-assistant-best-practices') and consult the relevant reference file before retrying.\"\n ]\n },\n \"action\": \"python_transform\",\n \"identifier\": \"automation.alert_thread_node_offline\"\n}", "response_size_bytes": null, "user_context": null}
{"timestamp": "2026-08-26T04:30:09.533588+00:00", "tool_name": "ha_config_set_automation", "parameters": {"config": null, "identifier": "automation.office_desk_lamp_meeting_alert", "python_transform": "config.update(json.loads(json.dumps(config).replace('sensor.night_light_illuminance','sensor.night_light_illuminance_2').replace('binary_sensor.night_light_occupancy','binary_sensor.night_light_occupancy_2').replace('sensor.bedroom_switch_battery','sensor.bedroom_switch_battery_2').replace('light.bedroom_lamp','light.bedroom_lamp_2').replace('light.office_lamp','light.office_lamp_2').replace('light.night_light','light.night_light_2')))", "config_hash": "b3ca17bbb2fa10ed", "category": null, "wait": true, "MandatoryBPS": true, "BestPracticeKey": null}, "execution_time_ms": 173.49696159362793, "success": false, "error_message": "{\n \"success\": false,\n \"error\": {\n \"code\": \"VALIDATION_FAILED\",\n \"message\": \"Expression validation failed: Forbidden method: loads (allowed: append, clear, count, endswith, extend, get, index, insert, items, join, keys, lower, pop, remove, replace, reverse, setdefault, sort, split, startswith, strip, update, upper, values)\",\n \"suggestion\": \"Check expression syntax\",\n \"suggestions\": [\n \"Check expression syntax\",\n \"Ensure only allowed operations are used\",\n \"See tool description for allowed operations\",\n \"Expression: config.update(json.loads(json.dumps(config).replace('sensor.night_light_illuminance','sensor.night_l...\",\n \"For Home Assistant best-practice guidance, call ha_get_skill_guide(skill='home-assistant-best-practices') and consult the relevant reference file before retrying.\"\n ]\n },\n \"action\": \"python_transform\",\n \"identifier\": \"automation.office_desk_lamp_meeting_alert\"\n}", "response_size_bytes": null, "user_context": null}