3 files
This commit is contained in:
@@ -2458,3 +2458,5 @@
|
||||
{"timestamp": "2026-08-26T06:42:10.961243+00:00", "tool_name": "ha_config_get_dashboard", "parameters": {"url_path": "ender5-printer", "list_only": false, "force_reload": false, "entity_id": null, "card_type": "webrtc-camera", "heading": null, "include_config": false, "include_screenshot": false, "view_path": null, "mode": null, "query": null}, "execution_time_ms": 5.735874176025391, "success": true, "error_message": null, "response_size_bytes": 389, "user_context": null}
|
||||
{"timestamp": "2026-08-26T06:42:29.026882+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": 4.004955291748047, "success": true, "error_message": null, "response_size_bytes": 17993, "user_context": null}
|
||||
{"timestamp": "2026-08-26T06:42:39.468593+00:00", "tool_name": "ha_config_set_dashboard", "parameters": {"url_path": "ender5-printer", "config": null, "python_transform": "config[\"views\"][0][\"sections\"][0][\"cards\"][6][\"cards\"][0][\"url\"] = \"https://endercamera2.duckdns.org/stream\"", "config_hash": "395ec40de021e9a3", "title": null, "icon": null, "require_admin": null, "show_in_sidebar": null, "MandatoryBPS": false, "BestPracticeKey": null, "return_screenshot": false, "view_path": null}, "execution_time_ms": 10.83230972290039, "success": true, "error_message": null, "response_size_bytes": 545, "user_context": null}
|
||||
{"timestamp": "2026-08-26T06:43:53.182039+00:00", "tool_name": "ha_config_set_dashboard", "parameters": {"url_path": "printer-stats", "config": null, "python_transform": "config[\"views\"][0][\"sections\"][0][\"cards\"][2] = {\"type\": \"custom:webrtc-camera\", \"url\": \"https://endercamera2.duckdns.org/stream\", \"grid_options\": {\"columns\": \"full\"}}", "config_hash": "087c2e97ebd63c5c", "title": null, "icon": null, "require_admin": null, "show_in_sidebar": null, "MandatoryBPS": false, "BestPracticeKey": null, "return_screenshot": false, "view_path": null}, "execution_time_ms": 11.230945587158203, "success": true, "error_message": null, "response_size_bytes": 752, "user_context": null}
|
||||
{"timestamp": "2026-08-26T06:43:55.051897+00:00", "tool_name": "ha_config_set_dashboard", "parameters": {"url_path": "ender5-printer", "config": null, "python_transform": "config[\"views\"][0][\"sections\"][0][\"cards\"][6][\"cards\"][0] = {\"type\": \"custom:webrtc-camera\", \"url\": \"https://endercamera2.duckdns.org/stream\", \"style\": \"border-radius: 12px 12px 0 0; overflow: hidden;\"}", "config_hash": "d085eb346d8dd8a9", "title": null, "icon": null, "require_admin": null, "show_in_sidebar": null, "MandatoryBPS": false, "BestPracticeKey": null, "return_screenshot": false, "view_path": null}, "execution_time_ms": 18.781185150146484, "success": true, "error_message": null, "response_size_bytes": 639, "user_context": null}
|
||||
|
||||
@@ -483,55 +483,9 @@
|
||||
"type": "horizontal-stack",
|
||||
"cards": [
|
||||
{
|
||||
"type": "custom:button-card",
|
||||
"entity": "binary_sensor.octoprint_connected",
|
||||
"show_name": false,
|
||||
"show_icon": false,
|
||||
"tap_action": {
|
||||
"action": "none"
|
||||
},
|
||||
"custom_fields": {
|
||||
"content": "[[[\n const connected = states['binary_sensor.octoprint_connected']?.state === 'on';\n const printing = states['binary_sensor.octoprint_printing']?.state === 'on';\n const paused = states['binary_sensor.octoprint_paused']?.state === 'on';\n const prints = states['sensor.octoprint_printer_prints_today']?.state || '0';\n const ptime = states['sensor.octoprint_printer_print_time_today']?.state || '--';\n const fil = ((parseFloat(states['sensor.octoprint_filament_daily']?.state) || 0) / 10).toFixed(1);\n\n const row = (label, value, vc) => `\n <div style=\"display:grid; grid-template-columns:1fr auto; align-items:center; padding:5px 0; border-bottom:1px solid rgba(var(--rgb-primary-text-color),0.06); width:100%;\">\n <span style=\"font-size:12px; color:var(--secondary-text-color);\">${label}</span>\n <span style=\"font-size:12px; font-weight:500; color:${vc || 'var(--primary-text-color)'}; text-align:right;\">${value}</span>\n </div>`;\n return `\n <div style=\"position:absolute; top:14px; left:16px; right:16px; bottom:14px; display:flex; flex-direction:column;\">\n <div style=\"display:flex; align-items:center; gap:5px; margin-bottom:10px;\">\n <ha-icon icon=\"mdi:stethoscope\" style=\"color:#4CAF50; --mdc-icon-size:14px;\"></ha-icon>\n <span style=\"font-size:11px; color:var(--secondary-text-color); text-transform:uppercase; letter-spacing:0.05em;\">Diagnostics</span>\n </div>\n ${row('Connected', connected ? 'Yes' : 'No', connected ? '#4CAF50' : '#F44336')}\n ${row('Status', printing ? (paused ? 'Paused' : 'Printing') : 'Idle', printing ? '#4CAF50' : null)}\n ${row('Prints today', prints, null)}\n ${row('Time today', ptime + ' h', null)}\n ${row('Filament today', fil + ' m', null)}\n </div>\n `;\n ]]]"
|
||||
},
|
||||
"styles": {
|
||||
"card": [
|
||||
{
|
||||
"background": "var(--ha-card-background, var(--card-background-color))"
|
||||
},
|
||||
{
|
||||
"border-radius": "12px"
|
||||
},
|
||||
{
|
||||
"padding": "0"
|
||||
},
|
||||
{
|
||||
"height": "74px"
|
||||
},
|
||||
{
|
||||
"position": "relative"
|
||||
},
|
||||
{
|
||||
"box-shadow": "none"
|
||||
},
|
||||
{
|
||||
"height": "190px"
|
||||
}
|
||||
],
|
||||
"custom_fields": {
|
||||
"content": [
|
||||
{
|
||||
"position": "absolute"
|
||||
},
|
||||
{
|
||||
"inset": "0"
|
||||
},
|
||||
{
|
||||
"padding": "0"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"url": "https://endercamera2.duckdns.org/stream"
|
||||
"type": "custom:webrtc-camera",
|
||||
"url": "https://endercamera2.duckdns.org/stream",
|
||||
"style": "border-radius: 12px 12px 0 0; overflow: hidden;"
|
||||
},
|
||||
{
|
||||
"type": "vertical-stack",
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
{
|
||||
"type": "custom:webrtc-camera",
|
||||
"url": "https://endercamera2.duckdns.org/stream",
|
||||
"mode": "mse",
|
||||
"grid_options": {
|
||||
"columns": "full"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user