From df75e4669ad4d3d7a92a5302a055acbee24e5b18 Mon Sep 17 00:00:00 2001 From: Home Assistant Version Control Date: Mon, 7 Sep 2026 15:13:17 +0000 Subject: [PATCH] .ha_mcp/logs/mcp_usage.jsonl, .storage/lovelace.printer_stats --- .ha_mcp/logs/mcp_usage.jsonl | 2 ++ .storage/lovelace.printer_stats | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.ha_mcp/logs/mcp_usage.jsonl b/.ha_mcp/logs/mcp_usage.jsonl index 2ad21081..017e5588 100644 --- a/.ha_mcp/logs/mcp_usage.jsonl +++ b/.ha_mcp/logs/mcp_usage.jsonl @@ -3605,3 +3605,5 @@ {"timestamp": "2026-09-07T15:07:15.350102+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": 37.55688667297363, "success": true, "error_message": null, "response_size_bytes": 11555, "user_context": null} {"timestamp": "2026-09-07T15:11:20.935596+00:00", "tool_name": "ha_config_set_dashboard", "parameters": {"url_path": "printer-stats", "config": null, "python_transform": "c = config['views'][0]['sections'][1]['cards'][6]; c.update({\"primary\": \"Height\", \"secondary\": \"{% set c = states('sensor.octoprint_height_progress_clean') | float(0) %}{% set t = state_attr('sensor.octoprint_height_progress_clean', 'total') | float(0) %}{{ c }} of {{ t }} mm\", \"multiline_secondary\": True})", "config_hash": "109d43d82a313a01", "title": null, "icon": null, "require_admin": null, "show_in_sidebar": null, "MandatoryBPS": false, "BestPracticeKey": null, "return_screenshot": false, "view_path": null}, "execution_time_ms": 23.666858673095703, "success": true, "error_message": null, "response_size_bytes": 905, "user_context": null} {"timestamp": "2026-09-07T15:11:23.040577+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": 10.472297668457031, "success": true, "error_message": null, "response_size_bytes": 11599, "user_context": null} +{"timestamp": "2026-09-07T15:13:05.531824+00:00", "tool_name": "ha_config_set_dashboard", "parameters": {"url_path": "printer-stats", "config": null, "python_transform": "cards = config['views'][0]['sections'][1]['cards']; cards[2].update({\"primary\": \"Elapsed\", \"multiline_secondary\": True, \"secondary\": \"{% set s = states('sensor.octoprint_elapsed') | float(0) %}{% set h = (s / 3600) | int %}{% set m = ((s % 3600) / 60) | int %}{% if h %}{{ h }} hr {{ m }} min{% else %}{{ m }} min{% endif %}\"}); cards[3].update({\"primary\": \"Remaining\", \"multiline_secondary\": True, \"secondary\": \"{% set s = states('sensor.octoprint_time_left') | float(-1) %}{% if s <= 0 %}No estimate{% else %}{% set h = (s / 3600) | int %}{% set m = ((s % 3600) / 60) | int %}{% if h %}{{ h }} hr {{ m }} min{% else %}{{ m }} min{% endif %}{% endif %}\"}); cards[5].update({\"primary\": \"Layer\", \"multiline_secondary\": True, \"secondary\": \"{% set c = states('sensor.octoprint_layer_progress') | int(0) %}{% set t = state_attr('sensor.octoprint_layer_progress', 'total') | int(0) %}{{ c }} of {{ t }}\"})", "config_hash": "e6c76696b845b123", "title": null, "icon": null, "require_admin": null, "show_in_sidebar": null, "MandatoryBPS": false, "BestPracticeKey": null, "return_screenshot": false, "view_path": null}, "execution_time_ms": 317.64841079711914, "success": true, "error_message": null, "response_size_bytes": 1501, "user_context": null} +{"timestamp": "2026-09-07T15:13:11.968986+00:00", "tool_name": "ha_config_get_dashboard", "parameters": {"url_path": "printer-stats", "list_only": false, "force_reload": false, "entity_id": "sensor.octoprint_elapsed", "card_type": null, "heading": null, "include_config": false, "include_screenshot": false, "view_path": "print", "mode": null, "query": null}, "execution_time_ms": 179.40640449523926, "success": true, "error_message": null, "response_size_bytes": 737, "user_context": null} diff --git a/.storage/lovelace.printer_stats b/.storage/lovelace.printer_stats index 79f084f7..587ad7aa 100644 --- a/.storage/lovelace.printer_stats +++ b/.storage/lovelace.printer_stats @@ -128,21 +128,25 @@ }, { "type": "custom:mushroom-template-card", - "primary": "{% set s = states('sensor.octoprint_elapsed') | float(0) %}{% set h = (s / 3600) | int %}{% set m = ((s % 3600) / 60) | int %}Elapsed: {% if h %}{{ h }} hr {{ m }} min{% else %}{{ m }} min{% endif %}", + "primary": "Elapsed", "name": "Elapsed", "icon": "mdi:clock-start", "grid_options": { "columns": 6 - } + }, + "multiline_secondary": true, + "secondary": "{% set s = states('sensor.octoprint_elapsed') | float(0) %}{% set h = (s / 3600) | int %}{% set m = ((s % 3600) / 60) | int %}{% if h %}{{ h }} hr {{ m }} min{% else %}{{ m }} min{% endif %}" }, { "type": "custom:mushroom-template-card", - "primary": "{% set s = states('sensor.octoprint_time_left') | float(-1) %}{% if s <= 0 %}Remaining: No estimate{% else %}{% set h = (s / 3600) | int %}{% set m = ((s % 3600) / 60) | int %}Remain: {% if h %}{{ h }} hr {{ m }} min{% else %}{{ m }} min{% endif %}{% endif %}", + "primary": "Remaining", "name": "Remaining", "icon": "mdi:clock-end", "grid_options": { "columns": 6 - } + }, + "multiline_secondary": true, + "secondary": "{% set s = states('sensor.octoprint_time_left') | float(-1) %}{% if s <= 0 %}No estimate{% else %}{% set h = (s / 3600) | int %}{% set m = ((s % 3600) / 60) | int %}{% if h %}{{ h }} hr {{ m }} min{% else %}{{ m }} min{% endif %}{% endif %}" }, { "type": "markdown", @@ -153,12 +157,14 @@ }, { "type": "custom:mushroom-template-card", - "primary": "{% set c = states('sensor.octoprint_layer_progress') | int(0) %}{% set t = state_attr('sensor.octoprint_layer_progress', 'total') | int(0) %}Layer: {{ c }} of {{ t }}", + "primary": "Layer", "name": "Layer", "icon": "mdi:layers", "grid_options": { "columns": 6 - } + }, + "multiline_secondary": true, + "secondary": "{% set c = states('sensor.octoprint_layer_progress') | int(0) %}{% set t = state_attr('sensor.octoprint_layer_progress', 'total') | int(0) %}{{ c }} of {{ t }}" }, { "type": "custom:mushroom-template-card",