{ "version": 1, "minor_version": 1, "key": "lovelace.ender5_printer", "data": { "config": { "views": [ { "title": "Ender 5", "path": "printer", "icon": "mdi:printer-3d-nozzle", "type": "sections", "max_columns": 3, "subview": false, "sections": [ { "type": "grid", "cards": [ { "type": "heading", "icon": "mdi:printer", "heading_style": "title", "heading": "Ender 5", "badges": [ { "type": "entity", "show_state": true, "show_icon": false, "entity": "sensor.octoprint_print_status" }, { "type": "button", "icon": "mdi:pause", "text": "Pause", "tap_action": { "action": "perform-action", "perform_action": "switch.turn_on", "target": { "entity_id": "switch.octoprint_pause_print" } }, "visibility": [ { "condition": "state", "entity": "binary_sensor.octoprint_paused", "state": "off" }, { "condition": "state", "entity": "binary_sensor.octoprint_printing", "state": "on" } ] }, { "type": "button", "icon": "mdi:play", "text": "Resume", "tap_action": { "action": "perform-action", "perform_action": "switch.turn_off", "target": { "entity_id": "switch.octoprint_pause_print" } }, "visibility": [ { "condition": "state", "entity": "binary_sensor.octoprint_paused", "state": "on" } ] }, { "type": "button", "icon": "mdi:stop", "text": "Cancel", "color": "#F44336", "tap_action": { "action": "perform-action", "perform_action": "button.press", "target": { "entity_id": "button.octoprint_cancel_print" }, "confirmation": { "text": "Cancel the current print?" } }, "visibility": [ { "condition": "state", "entity": "binary_sensor.octoprint_printing", "state": "on" } ] }, { "type": "button", "icon": "mdi:alert-octagon", "text": "Emergency stop", "color": "#F44336", "tap_action": { "action": "perform-action", "perform_action": "button.press", "target": { "entity_id": "button.octoprint_emergency_stop" }, "confirmation": { "text": "Emergency stop the printer NOW?" } } } ] }, { "type": "horizontal-stack", "cards": [ { "type": "custom:button-card", "entity": "sensor.octoprint_tool_0_temperature", "show_name": false, "show_state": false, "show_icon": false, "tap_action": { "action": "more-info" }, "custom_fields": { "content": "[[[\n const sec = 'var(--secondary-text-color)';\n const pri = 'var(--primary-text-color)';\n const v = (Math.round(parseFloat(states['sensor.octoprint_tool_0_temperature']?.state) || 0)) + '\\u00B0C';\n const s = 'target: ' + (Math.round(parseFloat(states['sensor.octoprint_tool_0_target']?.state) || 0)) + '\\u00B0C';\n return `\n