.ha_mcp/logs/mcp_usage.jsonl, .storage/lovelace.printer_stats
This commit is contained in:
@@ -1750,3 +1750,4 @@
|
|||||||
{"timestamp": "2026-08-22T02:51:30.942080+00:00", "tool_name": "ha_config_get_dashboard", "parameters": {"url_path": "printer-stats", "list_only": false, "force_reload": false, "entity_id": null, "card_type": null, "heading": null, "include_config": false, "include_screenshot": false, "view_path": "print", "mode": null, "query": null}, "execution_time_ms": 4.397153854370117, "success": true, "error_message": null, "response_size_bytes": 9419, "user_context": null}
|
{"timestamp": "2026-08-22T02:51:30.942080+00:00", "tool_name": "ha_config_get_dashboard", "parameters": {"url_path": "printer-stats", "list_only": false, "force_reload": false, "entity_id": null, "card_type": null, "heading": null, "include_config": false, "include_screenshot": false, "view_path": "print", "mode": null, "query": null}, "execution_time_ms": 4.397153854370117, "success": true, "error_message": null, "response_size_bytes": 9419, "user_context": null}
|
||||||
{"timestamp": "2026-08-22T02:54:13.124557+00:00", "tool_name": "ha_config_get_dashboard", "parameters": {"url_path": "ender5-printer", "list_only": false, "force_reload": false, "entity_id": "sensor.octoprint_serial_health_ratio", "card_type": null, "heading": null, "include_config": false, "include_screenshot": false, "view_path": null, "mode": null, "query": null}, "execution_time_ms": 8.28099250793457, "success": true, "error_message": null, "response_size_bytes": 412, "user_context": null}
|
{"timestamp": "2026-08-22T02:54:13.124557+00:00", "tool_name": "ha_config_get_dashboard", "parameters": {"url_path": "ender5-printer", "list_only": false, "force_reload": false, "entity_id": "sensor.octoprint_serial_health_ratio", "card_type": null, "heading": null, "include_config": false, "include_screenshot": false, "view_path": null, "mode": null, "query": null}, "execution_time_ms": 8.28099250793457, "success": true, "error_message": null, "response_size_bytes": 412, "user_context": null}
|
||||||
{"timestamp": "2026-08-22T02:55:06.089350+00:00", "tool_name": "ha_config_set_dashboard", "parameters": {"url_path": "printer-stats", "config": null, "python_transform": "p = config['views'][0]['sections']\ncards0 = p[0]['cards']\nprog = p[1]['cards']\ncz_i = next(i for i,c in enumerate(prog) if c.get('entity') == 'sensor.octoprint_current_z')\ncz = prog.pop(cz_i)\npaused_i = next(i for i,c in enumerate(cards0) if c.get('entity') == 'binary_sensor.octoprint_paused')\ncards0.insert(paused_i + 1, cz)\nhist_cards = config['views'][1]['sections'][4]['cards']\ndead = {'sensor.octoprint_serial_health_ratio', 'binary_sensor.octoprint_serial_health_critical'}\nfor i in sorted([i for i,c in enumerate(hist_cards) if c.get('entity') in dead], reverse=True):\n hist_cards.pop(i)", "config_hash": "bb243178ce45a257", "title": null, "icon": null, "require_admin": null, "show_in_sidebar": null, "MandatoryBPS": true, "BestPracticeKey": null, "return_screenshot": false, "view_path": null}, "execution_time_ms": 10.36691665649414, "success": false, "error_message": "{\n \"success\": false,\n \"error\": {\n \"code\": \"VALIDATION_FAILED\",\n \"message\": \"Expression raised at runtime: NameError: name 'next' is not defined\",\n \"suggestion\": \"Verify referenced keys/indices exist in the input\",\n \"suggestions\": [\n \"Verify referenced keys/indices exist in the input\",\n \"Check that types match (e.g. dict vs list operations)\",\n \"Use .get(key, default) to handle missing keys\",\n \"Expression: p = config['views'][0]['sections']\\ncards0 = p[0]['cards']\\nprog = p[1]['cards']\\ncz_i = next(i for i,c...\",\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 \"url_path\": \"printer-stats\"\n}", "response_size_bytes": null, "user_context": null}
|
{"timestamp": "2026-08-22T02:55:06.089350+00:00", "tool_name": "ha_config_set_dashboard", "parameters": {"url_path": "printer-stats", "config": null, "python_transform": "p = config['views'][0]['sections']\ncards0 = p[0]['cards']\nprog = p[1]['cards']\ncz_i = next(i for i,c in enumerate(prog) if c.get('entity') == 'sensor.octoprint_current_z')\ncz = prog.pop(cz_i)\npaused_i = next(i for i,c in enumerate(cards0) if c.get('entity') == 'binary_sensor.octoprint_paused')\ncards0.insert(paused_i + 1, cz)\nhist_cards = config['views'][1]['sections'][4]['cards']\ndead = {'sensor.octoprint_serial_health_ratio', 'binary_sensor.octoprint_serial_health_critical'}\nfor i in sorted([i for i,c in enumerate(hist_cards) if c.get('entity') in dead], reverse=True):\n hist_cards.pop(i)", "config_hash": "bb243178ce45a257", "title": null, "icon": null, "require_admin": null, "show_in_sidebar": null, "MandatoryBPS": true, "BestPracticeKey": null, "return_screenshot": false, "view_path": null}, "execution_time_ms": 10.36691665649414, "success": false, "error_message": "{\n \"success\": false,\n \"error\": {\n \"code\": \"VALIDATION_FAILED\",\n \"message\": \"Expression raised at runtime: NameError: name 'next' is not defined\",\n \"suggestion\": \"Verify referenced keys/indices exist in the input\",\n \"suggestions\": [\n \"Verify referenced keys/indices exist in the input\",\n \"Check that types match (e.g. dict vs list operations)\",\n \"Use .get(key, default) to handle missing keys\",\n \"Expression: p = config['views'][0]['sections']\\ncards0 = p[0]['cards']\\nprog = p[1]['cards']\\ncz_i = next(i for i,c...\",\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 \"url_path\": \"printer-stats\"\n}", "response_size_bytes": null, "user_context": null}
|
||||||
|
{"timestamp": "2026-08-22T02:55:27.271715+00:00", "tool_name": "ha_config_set_dashboard", "parameters": {"url_path": "printer-stats", "config": null, "python_transform": "p = config['views'][0]['sections']\ncards0 = p[0]['cards']\nprog = p[1]['cards']\ncz_i = -1\nfor i in range(len(prog)):\n if prog[i].get('entity') == 'sensor.octoprint_current_z':\n cz_i = i\ncz = prog.pop(cz_i)\npaused_i = 0\nfor i in range(len(cards0)):\n if cards0[i].get('entity') == 'binary_sensor.octoprint_paused':\n paused_i = i\ncards0.insert(paused_i + 1, cz)\nhist_cards = config['views'][1]['sections'][4]['cards']\ndead = ['sensor.octoprint_serial_health_ratio', 'binary_sensor.octoprint_serial_health_critical']\nfor i in sorted([i for i, c in enumerate(hist_cards) if c.get('entity') in dead], reverse=True):\n hist_cards.pop(i)", "config_hash": "bb243178ce45a257", "title": null, "icon": null, "require_admin": null, "show_in_sidebar": null, "MandatoryBPS": true, "BestPracticeKey": null, "return_screenshot": false, "view_path": null}, "execution_time_ms": 68.60136985778809, "success": true, "error_message": null, "response_size_bytes": 30734, "user_context": null}
|
||||||
|
|||||||
@@ -72,6 +72,15 @@
|
|||||||
"columns": 6
|
"columns": 6
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "tile",
|
||||||
|
"entity": "sensor.octoprint_current_z",
|
||||||
|
"name": "Current Z",
|
||||||
|
"icon": "mdi:axis-z-arrow",
|
||||||
|
"grid_options": {
|
||||||
|
"columns": 6
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "markdown",
|
"type": "markdown",
|
||||||
"content": "**File:** {{ states('sensor.octoprint_print_file') }}\n**Size:** {{ (states('sensor.octoprint_print_file_size') | int(0) / 1048576) | round(2) }} MB\n**User:** {{ states('sensor.octoprint_print_user') }}",
|
"content": "**File:** {{ states('sensor.octoprint_print_file') }}\n**Size:** {{ (states('sensor.octoprint_print_file_size') | int(0) / 1048576) | round(2) }} MB\n**User:** {{ states('sensor.octoprint_print_user') }}",
|
||||||
@@ -140,15 +149,6 @@
|
|||||||
"columns": 6
|
"columns": 6
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "tile",
|
|
||||||
"entity": "sensor.octoprint_current_z",
|
|
||||||
"name": "Current Z",
|
|
||||||
"icon": "mdi:axis-z-arrow",
|
|
||||||
"grid_options": {
|
|
||||||
"columns": 6
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "tile",
|
"type": "tile",
|
||||||
"entity": "light.3d_printer_lights",
|
"entity": "light.3d_printer_lights",
|
||||||
@@ -880,24 +880,6 @@
|
|||||||
"type": "tile",
|
"type": "tile",
|
||||||
"entity": "sensor.octoprint_uptime",
|
"entity": "sensor.octoprint_uptime",
|
||||||
"icon": "mdi:clock-outline"
|
"icon": "mdi:clock-outline"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "tile",
|
|
||||||
"entity": "sensor.octoprint_serial_health_ratio",
|
|
||||||
"name": "Serial Health",
|
|
||||||
"icon": "mdi:heart-pulse",
|
|
||||||
"grid_options": {
|
|
||||||
"columns": 6
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "tile",
|
|
||||||
"entity": "binary_sensor.octoprint_serial_health_critical",
|
|
||||||
"name": "Serial Critical",
|
|
||||||
"icon": "mdi:alert",
|
|
||||||
"grid_options": {
|
|
||||||
"columns": 6
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user