From 91d3ec98ede141d3cc8cf83fc0cc895262e8dde0 Mon Sep 17 00:00:00 2001 From: Home Assistant Version Control Date: Mon, 24 Aug 2026 17:34:36 +0000 Subject: [PATCH] .ha_mcp/logs/mcp_usage.jsonl, .storage/lovelace.printer_stats --- .ha_mcp/logs/mcp_usage.jsonl | 1 + .storage/lovelace.printer_stats | 72 +++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/.ha_mcp/logs/mcp_usage.jsonl b/.ha_mcp/logs/mcp_usage.jsonl index 76144fce..0a074f1c 100644 --- a/.ha_mcp/logs/mcp_usage.jsonl +++ b/.ha_mcp/logs/mcp_usage.jsonl @@ -1919,3 +1919,4 @@ {"timestamp": "2026-08-24T17:33:27.713420+00:00", "tool_name": "ha_config_get_dashboard", "parameters": {"url_path": null, "list_only": true, "force_reload": false, "entity_id": null, "card_type": null, "heading": null, "include_config": false, "include_screenshot": false, "view_path": null, "mode": null, "query": null}, "execution_time_ms": 2.6941299438476562, "success": true, "error_message": null, "response_size_bytes": 1871, "user_context": null} {"timestamp": "2026-08-24T17:33:27.974694+00:00", "tool_name": "ha_config_get_dashboard", "parameters": {"url_path": null, "list_only": false, "force_reload": false, "entity_id": null, "card_type": null, "heading": null, "include_config": false, "include_screenshot": false, "view_path": null, "mode": "search", "query": "octoprint_filament_used_weight_total"}, "execution_time_ms": 29.054641723632812, "success": true, "error_message": null, "response_size_bytes": 582, "user_context": null} {"timestamp": "2026-08-24T17:33:37.764266+00:00", "tool_name": "ha_config_get_dashboard", "parameters": {"url_path": "ender5-printer", "list_only": false, "force_reload": false, "entity_id": null, "card_type": null, "heading": null, "include_config": false, "include_screenshot": false, "view_path": null, "mode": null, "query": null}, "execution_time_ms": 13.705015182495117, "success": true, "error_message": null, "response_size_bytes": 17635, "user_context": null} +{"timestamp": "2026-08-24T17:34:29.584348+00:00", "tool_name": "ha_config_set_dashboard", "parameters": {"url_path": "printer-stats", "config": null, "python_transform": "card = {'type': 'custom:apexcharts-card', 'header': {'show': True, 'title': 'Filament Usage - Grams (30 days)', 'show_states': True, 'colorize_states': True}, 'graph_span': '30d', 'apex_config': {'chart': {'type': 'bar', 'height': 300}, 'plotOptions': {'bar': {'columnWidth': '50%'}}, 'dataLabels': {'enabled': False}, 'yaxis': {'tickAmount': 4, 'labels': {'minWidth': 40}}}, 'series': [{'entity': 'sensor.octoprint_filament_weight_daily', 'name': 'Used (g)', 'color': '#26c6da', 'type': 'column', 'group_by': {'func': 'last', 'duration': '1d', 'start_with_last': True}}, {'entity': 'sensor.octoprint_filament_used_weight_total', 'name': 'Total (g)', 'color': '#ab47bc', 'type': 'line', 'curve': 'straight', 'group_by': {'func': 'last', 'duration': '1d', 'start_with_last': True}}, {'entity': 'sensor.octoprint_filament_weight_weekly', 'name': 'Weekly (g)', 'color': '#ffca28', 'type': 'column', 'group_by': {'func': 'last', 'duration': '1d', 'start_with_last': True}}], 'grid_options': {'columns': 'full'}, 'span': {'end': 'day'}}; [sec['cards'].append(card) for sec in config['views'][0]['sections'] if any(c.get('type') == 'heading' and c.get('heading') == 'Filament Usage' for c in sec.get('cards', []) if isinstance(c, dict))]", "config_hash": "8f174086b2572908", "title": null, "icon": null, "require_admin": null, "show_in_sidebar": null, "MandatoryBPS": false, "BestPracticeKey": null, "return_screenshot": false, "view_path": null}, "execution_time_ms": 13.576030731201172, "success": true, "error_message": null, "response_size_bytes": 1816, "user_context": null} diff --git a/.storage/lovelace.printer_stats b/.storage/lovelace.printer_stats index 75e9cbe6..2d0e4f52 100644 --- a/.storage/lovelace.printer_stats +++ b/.storage/lovelace.printer_stats @@ -514,6 +514,78 @@ "grid_options": { "columns": 4 } + }, + { + "type": "custom:apexcharts-card", + "header": { + "show": true, + "title": "Filament Usage - Grams (30 days)", + "show_states": true, + "colorize_states": true + }, + "graph_span": "30d", + "apex_config": { + "chart": { + "type": "bar", + "height": 300 + }, + "plotOptions": { + "bar": { + "columnWidth": "50%" + } + }, + "dataLabels": { + "enabled": false + }, + "yaxis": { + "tickAmount": 4, + "labels": { + "minWidth": 40 + } + } + }, + "series": [ + { + "entity": "sensor.octoprint_filament_weight_daily", + "name": "Used (g)", + "color": "#26c6da", + "type": "column", + "group_by": { + "func": "last", + "duration": "1d", + "start_with_last": true + } + }, + { + "entity": "sensor.octoprint_filament_used_weight_total", + "name": "Total (g)", + "color": "#ab47bc", + "type": "line", + "curve": "straight", + "group_by": { + "func": "last", + "duration": "1d", + "start_with_last": true + } + }, + { + "entity": "sensor.octoprint_filament_weight_weekly", + "name": "Weekly (g)", + "color": "#ffca28", + "type": "column", + "group_by": { + "func": "last", + "duration": "1d", + "start_with_last": true + } + } + ], + "grid_options": { + "columns": "full" + }, + "span": { + "end": "day" + } } ] }