.ha_mcp/logs/mcp_usage.jsonl

This commit is contained in:
Home Assistant Version Control
2026-10-16 20:32:35 +00:00
parent 0b156d0ba2
commit fac8d5e400
+2
View File
@@ -4780,3 +4780,5 @@
{"timestamp": "2026-10-16T20:30:30.357469+00:00", "tool_name": "ha_config_set_dashboard", "parameters": {"url_path": "3d-printer-cellphone", "config": null, "python_transform": "# Fix with horizontal-stack + tile cards for better left alignment on small screens\nstack = config['views'][0]['sections'][0]['cards'][1]\nstack['type'] = 'horizontal-stack'\nstack['cards'] = []\nfor i in range(1, 5):\n slot = f'slot_{i}'\n card = {\n 'type': 'tile',\n 'entity': f'sensor.sparkx_i7_cfs_box_1_{slot}_color',\n 'name': '',\n 'icon': 'none',\n 'state_content': ['state'],\n 'grid_options': {'columns': 3},\n 'tap_action': {'action': 'none'},\n 'card_mod': {\n 'style': \"ha-card { padding: 0 4px; margin: 0; } .tile { padding: 0; } .tile__title { display: none; } .tile__state { text-align: left; justify-content: flex-start; font-size: 10px; line-height: 1; margin: 0; padding: 0; } .tile__icon { display: none; }\"\n }\n }\n # Use template for primary content\n if i == 1:\n card['state_display'] = \"{% if states('sensor.sparkx_i7_print_status') in ['printing', 'paused'] %}{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298) %}{% set cur = states('sensor.sparkx_i7_used_material_length') | float(0) %}{% set ck = states('input_number.sparkx_i7_spoolman_length_checkpoint') | float(0) %}{% set booked = states('input_number.sparkx_i7_slot_1_grams') | float(0) %}{% set live = booked + ((([cur - ck, 0] | max) * gcm) if states('sensor.sparkx_i7_active_filament_slot') == 'box_1_slot_1' else 0) %}{{ live | round(1) }}g{% else %}{{ (states('input_number.sparkx_i7_slot_1_grams') | float(0)) | round(1) }}g{% endif %}\"\n elif i == 2:\n card['state_display'] = \"{% if states('sensor.sparkx_i7_print_status') in ['printing', 'paused'] %}{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298) %}{% set cur = states('sensor.sparkx_i7_used_material_length') | float(0) %}{% set ck = states('input_number.sparkx_i7_spoolman_length_checkpoint') | float(0) %}{% set booked = states('input_number.sparkx_i7_slot_2_grams') | float(0) %}{% set live = booked + ((([cur - ck, 0] | max) * gcm) if states('sensor.sparkx_i7_active_filament_slot') == 'box_1_slot_2' else 0) %}{{ live | round(1) }}g{% else %}{{ (states('input_number.sparkx_i7_slot_2_grams') | float(0)) | round(1) }}g{% endif %}\"\n elif i == 3:\n card['state_display'] = \"{% if states('sensor.sparkx_i7_print_status') in ['printing', 'paused'] %}{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298) %}{% set cur = states('sensor.sparkx_i7_used_material_length') | float(0) %}{% set ck = states('input_number.sparkx_i7_spoolman_length_checkpoint') | float(0) %}{% set booked = states('input_number.sparkx_i7_slot_3_grams') | float(0) %}{% set live = booked + ((([cur - ck, 0] | max) * gcm) if states('sensor.sparkx_i7_active_filament_slot') == 'box_1_slot_3' else 0) %}{{ live | round(1) }}g{% else %}{{ (states('input_number.sparkx_i7_slot_3_grams') | float(0)) | round(1) }}g{% endif %}\"\n else:\n card['state_display'] = \"{% if states('sensor.sparkx_i7_print_status') in ['printing', 'paused'] %}{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298) %}{% set cur = states('sensor.sparkx_i7_used_material_length') | float(0) %}{% set ck = states('input_number.sparkx_i7_spoolman_length_checkpoint') | float(0) %}{% set booked = states('input_number.sparkx_i7_slot_4_grams') | float(0) %}{% set live = booked + ((([cur - ck, 0] | max) * gcm) if states('sensor.sparkx_i7_active_filament_slot') == 'box_1_slot_4' else 0) %}{{ live | round(1) }}g{% else %}{{ (states('input_number.sparkx_i7_slot_4_grams') | float(0)) | round(1) }}g{% endif %}\"\n stack['cards'].append(card)\n", "config_hash": "78e85d226ac2a106", "title": null, "icon": null, "require_admin": null, "show_in_sidebar": null, "MandatoryBPS": true, "BestPracticeKey": null, "return_screenshot": false, "view_path": null, "patch": null}, "execution_time_ms": 6155.618667602539, "success": true, "error_message": null, "response_size_bytes": 35956, "user_context": null}
{"timestamp": "2026-10-16T20:31:34.912493+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": false, "include_screenshot": false, "view_path": null, "query": null, "describe": false}, "execution_time_ms": 14.140605926513672, "success": true, "error_message": null, "response_size_bytes": 24022, "user_context": null}
{"timestamp": "2026-10-16T20:32:20.015012+00:00", "tool_name": "ha_config_set_dashboard", "parameters": {"url_path": "3d-printer-cellphone", "config": null, "python_transform": "# Replace with simple markdown/text cards showing only grams, left-aligned\nstack = config['views'][0]['sections'][0]['cards'][1]\nstack['type'] = 'horizontal-stack'\nstack['cards'] = []\nfor i in range(1, 5):\n card = {\n 'type': 'markdown',\n 'content': \"{% if states('sensor.sparkx_i7_print_status') in ['printing', 'paused'] %}{% set gcm = states('input_number.sparkx_i7_filament_g_cm') | float(0.0298) %}{% set cur = states('sensor.sparkx_i7_used_material_length') | float(0) %}{% set ck = states('input_number.sparkx_i7_spoolman_length_checkpoint') | float(0) %}{% set booked = states('input_number.sparkx_i7_slot_\"+str(i)+\"_grams') | float(0) %}{% set live = booked + ((([cur - ck, 0] | max) * gcm) if states('sensor.sparkx_i7_active_filament_slot') == 'box_1_slot_\"+str(i)+\"' else 0) %}{{ live | round(1) }}g{% else %}{{ (states('input_number.sparkx_i7_slot_\"+str(i)+\"_grams') | float(0)) | round(1) }}g{% endif %}\",\n 'card_mod': {\n 'style': 'ha-card { background: transparent; box-shadow: none; border: none; padding: 0 4px; margin: 0; text-align: left; } .markdown { padding: 0; margin: 0; text-align: left; } p { margin: 0; padding: 0; text-align: left; font-size: 11px; line-height: 1; }'\n }\n }\n stack['cards'].append(card)\n", "config_hash": "5f133246e66d2eb4", "title": null, "icon": null, "require_admin": null, "show_in_sidebar": null, "MandatoryBPS": true, "BestPracticeKey": null, "return_screenshot": false, "view_path": null, "patch": null}, "execution_time_ms": 14219.4082736969, "success": true, "error_message": null, "response_size_bytes": 32868, "user_context": null}
{"timestamp": "2026-10-16T20:32:28.875898+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": false, "include_screenshot": false, "view_path": "home", "query": null, "describe": false}, "execution_time_ms": 460.13879776000977, "success": false, "error_message": "{\n \"success\": false,\n \"error\": {\n \"code\": \"RESOURCE_NOT_FOUND\",\n \"message\": \"Dashboard view path 'home' is not found.\",\n \"suggestion\": \"Use a view_path returned by ha_config_get_dashboard\"\n },\n \"url_path\": \"3d-printer-cellphone\",\n \"view_path\": \"home\",\n \"available_view_paths\": []\n}", "response_size_bytes": null, "user_context": null}
{"timestamp": "2026-10-16T20:32:31.913272+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": false, "include_screenshot": true, "view_path": "0", "query": null, "describe": false}, "execution_time_ms": 2.414703369140625, "success": false, "error_message": "{\n \"success\": false,\n \"error\": {\n \"code\": \"RESOURCE_NOT_FOUND\",\n \"message\": \"Dashboard view path '0' is not found.\",\n \"suggestion\": \"Use a view_path returned by ha_config_get_dashboard\"\n },\n \"url_path\": \"3d-printer-cellphone\",\n \"view_path\": \"0\",\n \"available_view_paths\": []\n}", "response_size_bytes": null, "user_context": null}