# ============================================================ # Creality K2 Plus Dashboard for Home Assistant # Integration: https://github.com/3dg1luk43/ha_creality_ws # # SETUP: # 1. Install the ha_creality_ws integration via HACS # 2. Find your printer's entity prefix by running this template # in Developer Tools → Template: # # {% for state in states %} # {% if 'k2plus' in state.entity_id | lower %} # {{ state.entity_id }} # {% endif %} # {% endfor %} # # 3. Replace 'k2plus_1516' throughout this file with your prefix # e.g. if your printer is named 'myprinter' use 'myprinter' # # FEATURES: # - Live camera feed # - Print status: progress, layer, time left + ETA, speed, flow, material # - Current model preview image # - Temperature gauges (nozzle, bed, chamber) with severity colors # - Adjustable temperature targets + print tuning (inline sliders) # - XYZ position display # - Print controls: Pause, Resume, Stop (with confirmation), Home # - Print tuning and flow rate # - Chamber light toggle # - Fan controls (model, case, side) # - Dual CFS box filament tables (type, color, remaining %) # - External filament status # - 2-hour temperature history graph # - System status, filament status, reconnect button # - Progress + model preview auto-hide when idle # - Attention banner appears on error or stopped # # TESTED ON: Creality K2 Plus with dual CFS boxes # ============================================================ views: - title: 3D Printer icon: mdi:printer-3d path: printer badges: [] cards: # ── Alert: only shows when the printer needs attention ───────────────── - type: markdown visibility: - condition: state entity: sensor.k2plus_1516_print_status state: - error - stopped content: > # ⚠️ Printer needs attention **Status: {{ states('sensor.k2plus_1516_print_status') | title }}.** Check the printer. # ── Camera Feed ──────────────────────────────────────────────────────── - type: picture-entity entity: camera.k2plus_1516_printer_camera name: K2 Plus Live show_state: false show_name: false camera_view: auto # ── Print Status ─────────────────────────────────────────────────────── - type: markdown content: > ## 🖨️ K2 Plus: {{ states('sensor.k2plus_1516_print_status') | title }} {% set progress = states('sensor.k2plus_1516_print_progress') | float(0) %} {% set layer = states('sensor.k2plus_1516_working_layer') %} {% set total = states('sensor.k2plus_1516_total_layers') %} {% set time_left = states('sensor.k2plus_1516_print_time_left') | int(0) %} {% set job_time = states('sensor.k2plus_1516_print_job_time') | int(0) %} {% set obj = states('sensor.k2plus_1516_current_object') %} {% set obj_count = states('sensor.k2plus_1516_object_count') %} {% set material = states('sensor.k2plus_1516_used_material_length') %} {% set flow = states('sensor.k2plus_1516_real_time_flow') %} {% set speed = states('sensor.k2plus_1516_print_speed') %} {% set active_slot = states('sensor.k2plus_1516_active_filament_slot') %} **Progress:** {{ progress }}%  |  **Layer:** {{ layer }} / {{ total }} **Time Left:** {{ time_left // 3600 }}h {{ '%02d' | format(time_left % 3600 // 60) }}m  |  **Elapsed:** {{ job_time // 3600 }}h {{ '%02d' | format(job_time % 3600 // 60) }}m{% if time_left > 0 %}  |  **ETA:** {{ (now() + timedelta(seconds=time_left)).strftime('%I:%M %p') }}{% endif %} **Object:** {{ obj }} ({{ obj_count }} total)  |  **Active Slot:** {{ active_slot }} **Flow:** {{ flow }}  |  **Speed:** {{ speed }}  |  **Material Used:** {{ material }} # ── Progress ─────────────────────────────────────────────────────────── - type: entity entity: sensor.k2plus_1516_print_progress name: Print Progress icon: mdi:progress-clock visibility: - condition: state entity: sensor.k2plus_1516_print_status state: - printing - paused - processing - completed # ── Current Print Preview ────────────────────────────────────────────── - type: picture-entity entity: image.k2plus_1516_current_print_preview name: Current Model show_state: false show_name: true visibility: - condition: state entity: sensor.k2plus_1516_print_status state: - printing - paused - processing - completed # ── Temperature Gauges ───────────────────────────────────────────────── - type: horizontal-stack cards: - type: gauge entity: sensor.k2plus_1516_nozzle_temperature name: Nozzle min: 0 max: 300 needle: true severity: green: 0 yellow: 180 red: 260 - type: gauge entity: sensor.k2plus_1516_bed_temperature name: Bed min: 0 max: 120 needle: true severity: green: 0 yellow: 50 red: 100 - type: gauge entity: sensor.k2plus_1516_chamber_temperature name: Chamber min: 0 max: 60 needle: true severity: green: 0 yellow: 35 red: 50 # ── Temperature Targets ──────────────────────────────────────────────── - type: horizontal-stack cards: - type: tile entity: number.k2plus_1516_nozzle_target name: Nozzle Target icon: mdi:thermometer features: - type: numeric-input style: slider - type: tile entity: number.k2plus_1516_bed_target name: Bed Target icon: mdi:thermometer features: - type: numeric-input style: slider - type: tile entity: number.k2plus_1516_chamber_target name: Chamber Target icon: mdi:thermometer features: - type: numeric-input style: slider # ── XYZ Position ────────────────────────────────────────────────────── - type: horizontal-stack cards: - type: entity entity: sensor.k2plus_1516_position_x name: X icon: mdi:axis-x-arrow - type: entity entity: sensor.k2plus_1516_position_y name: Y icon: mdi:axis-y-arrow - type: entity entity: sensor.k2plus_1516_position_z name: Z icon: mdi:axis-z-arrow # ── Print Controls ───────────────────────────────────────────────────── - type: horizontal-stack cards: - type: button name: Pause icon: mdi:pause-circle show_state: false tap_action: action: perform-action perform_action: button.press target: entity_id: button.k2plus_1516_pause_print - type: button name: Resume icon: mdi:play-circle show_state: false tap_action: action: perform-action perform_action: button.press target: entity_id: button.k2plus_1516_resume_print - type: button name: Stop icon: mdi:stop-circle show_state: false tap_action: action: perform-action perform_action: button.press target: entity_id: button.k2plus_1516_stop_print confirmation: text: Stop the current print? This cannot be undone. - type: button name: Home icon: mdi:home show_state: false tap_action: action: perform-action perform_action: button.press target: entity_id: button.k2plus_1516_home_xy_then_z # ── Print Tuning ─────────────────────────────────────────────────────── - type: horizontal-stack cards: - type: tile entity: number.k2plus_1516_print_tuning name: Print Tuning icon: mdi:tune features: - type: numeric-input style: slider - type: entity entity: sensor.k2plus_1516_flow_rate name: Flow Rate icon: mdi:water-percent # ── Chamber Light ────────────────────────────────────────────────────── - type: button name: Chamber Light icon: mdi:lightbulb entity: light.k2plus_1516_light tap_action: action: toggle # ── Fans ─────────────────────────────────────────────────────────────── - type: horizontal-stack cards: - type: entity entity: fan.k2plus_1516_model_fan name: Model Fan icon: mdi:fan - type: entity entity: fan.k2plus_1516_case_fan name: Case Fan icon: mdi:fan - type: entity entity: fan.k2plus_1516_side_fan name: Side Fan icon: mdi:fan # ── CFS Box 1 ────────────────────────────────────────────────────────── # Remove this section if you don't have a CFS box - type: markdown content: > ## 📦 CFS Box 1 🌡️ **Temp:** {{ states('sensor.k2plus_1516_cfs_box_1_temp') }}°C  |  💧 **Humidity:** {{ states('sensor.k2plus_1516_cfs_box_1_humidity') }}% | Slot | Filament | Color | Remaining | |------|----------|-------|-----------| | 1 | {{ states('sensor.k2plus_1516_cfs_box_1_slot_1_filament') }} | {{ states('sensor.k2plus_1516_cfs_box_1_slot_1_color') }} | {{ states('sensor.k2plus_1516_cfs_box_1_slot_1_percent') }}% | | 2 | {{ states('sensor.k2plus_1516_cfs_box_1_slot_2_filament') }} | {{ states('sensor.k2plus_1516_cfs_box_1_slot_2_color') }} | {{ states('sensor.k2plus_1516_cfs_box_1_slot_2_percent') }}% | | 3 | {{ states('sensor.k2plus_1516_cfs_box_1_slot_3_filament') }} | {{ states('sensor.k2plus_1516_cfs_box_1_slot_3_color') }} | {{ states('sensor.k2plus_1516_cfs_box_1_slot_3_percent') }}% | | 4 | {{ states('sensor.k2plus_1516_cfs_box_1_slot_4_filament') }} | {{ states('sensor.k2plus_1516_cfs_box_1_slot_4_color') }} | {{ states('sensor.k2plus_1516_cfs_box_1_slot_4_percent') }}% | # ── CFS Box 2 ────────────────────────────────────────────────────────── # Remove this section if you only have one CFS box - type: markdown content: > ## 📦 CFS Box 2 🌡️ **Temp:** {{ states('sensor.k2plus_1516_cfs_box_2_temp') }}°C  |  💧 **Humidity:** {{ states('sensor.k2plus_1516_cfs_box_2_humidity') }}% | Slot | Filament | Color | Remaining | |------|----------|-------|-----------| | 1 | {{ states('sensor.k2plus_1516_cfs_box_2_slot_1_filament') }} | {{ states('sensor.k2plus_1516_cfs_box_2_slot_1_color') }} | {{ states('sensor.k2plus_1516_cfs_box_2_slot_1_percent') }}% | | 2 | {{ states('sensor.k2plus_1516_cfs_box_2_slot_2_filament') }} | {{ states('sensor.k2plus_1516_cfs_box_2_slot_2_color') }} | {{ states('sensor.k2plus_1516_cfs_box_2_slot_2_percent') }}% | | 3 | {{ states('sensor.k2plus_1516_cfs_box_2_slot_3_filament') }} | {{ states('sensor.k2plus_1516_cfs_box_2_slot_3_color') }} | {{ states('sensor.k2plus_1516_cfs_box_2_slot_3_percent') }}% | | 4 | {{ states('sensor.k2plus_1516_cfs_box_2_slot_4_filament') }} | {{ states('sensor.k2plus_1516_cfs_box_2_slot_4_color') }} | {{ states('sensor.k2plus_1516_cfs_box_2_slot_4_percent') }}% | # ── CFS External Filament ────────────────────────────────────────────── # Remove this section if you don't use external filament - type: markdown content: > ## 🧵 External Filament **Type:** {{ states('sensor.k2plus_1516_cfs_external_filament') }}  |  **Color:** {{ states('sensor.k2plus_1516_cfs_external_color') }}  |  **Remaining:** {{ states('sensor.k2plus_1516_cfs_external_percent') }}% # ── Temperature History ──────────────────────────────────────────────── - type: history-graph title: Temperature History (2hr) hours_to_show: 2 entities: - entity: sensor.k2plus_1516_nozzle_temperature name: Nozzle - entity: sensor.k2plus_1516_bed_temperature name: Bed - entity: sensor.k2plus_1516_chamber_temperature name: Chamber # ── System Status ────────────────────────────────────────────────────── - type: horizontal-stack cards: - type: entity entity: sensor.k2plus_1516_system name: System icon: mdi:information - type: entity entity: sensor.k2plus_1516_filament_status name: Filament icon: mdi:spool - type: button name: Reconnect icon: mdi:connection show_state: false tap_action: action: perform-action perform_action: button.press target: entity_id: button.k2plus_1516_reconnect