Skip to content

Add prism-anycubic card (hass-anycubic_cloud) with ACE support & job-info enhancements - #48

Open
Itstommy10 wants to merge 1 commit into
BangerTech:mainfrom
Itstommy10:feature/prism-anycubic-card
Open

Add prism-anycubic card (hass-anycubic_cloud) with ACE support & job-info enhancements#48
Itstommy10 wants to merge 1 commit into
BangerTech:mainfrom
Itstommy10:feature/prism-anycubic-card

Conversation

@Itstommy10

@Itstommy10 Itstommy10 commented Jun 22, 2026

Copy link
Copy Markdown

Overview

This PR adds a brand-new prism-anycubic card for Anycubic Cloud printers (via the hass-anycubic_cloud integration), cloned and adapted from prism-creality. It brings the same Prism design language (AMS-style filament slots, cover image, multi-printer camera view, notifications) to the Anycubic Kobra ecosystem, and adds several display/UX refinements requested during real-world testing.

New card: prism-anycubic

Supported printers: Kobra X, Kobra 3 / 3 Max / 3 Combo, Kobra 2 series, Kobra S1 and other Anycubic Cloud devices.

  • Entity resolution by translation_key (collision-free, since the integration uses has_entity_name=True), with an entity_id-suffix pattern fallback. Keys: job_progress, job_state, current_status, job_name, job_time_remaining/job_time_elapsed, job_current_layer/job_total_layers, curr_nozzle_temp/target_nozzle_temp, curr_hotbed_temp/target_hotbed_temp, fan_speed_pct, print_speed_pct/print_speed_mode, job_image_url, ACE (ace_spools, ace_current_temperature), binary sensors and control buttons.
  • Correct unit handling: job_time_remaining / job_time_elapsed are in minutes (not seconds/hours).
  • ACE (Anycubic Color Engine) support: reads sensor.<printer>_ace_spoolsspool_info list (material_type, color:[r,g,b], status, spool_loaded), rendered in the existing CFS/AMS slot UI (side & front views). status===5 / spool_loaded = loaded slot.
  • Capability gating: Anycubic Cloud exposes no side/case fan, no chamber temp, no light and no camera, so those chips are hidden by default (hasAuxFan/hasCaseFan/hasChamber, optional user-configured light_switch/camera_entity).
  • Reuses the existing Spoolman integration, multi-printer camera popup, and notification logic.

Job status panel (above the controls)

A new info panel renders the current job state as chips, updated live in updateValues() without a full re-render:

  • Job name (job_name)
  • Job state (job_state → Printing / Paused / Idle / Error / Downloading / …)
  • Progress % (job_progress)
  • Time left (job_time_remaining)
  • Elapsed (job_time_elapsed)
  • Speed mode (print_speed_mode, falls back to print_speed_pct as %)
  • Job date — extracted from the state of the preview entity (image.<printer>_job_preview), whose state is the last-update timestamp → formatted dd/mm/yy

Cover image (job preview) improvements

  • Always visible & centered as a "last print" preview, including when idle (previously only shown while printing/paused, so nothing appeared when the printer was idle).
  • Configurable placement & look via new sliders:
    • cover_image_position — vertical position (% from bottom) to align with the print bed
    • cover_image_position_h — horizontal position (% from left)
    • cover_image_opacity — preview opacity

Filament percentage (manual)

Since ACE exposes no remaining-percentage, the value is now manual & optional:

  • New display toggle show_filament_percent.
  • Tap the filament color swatch (or the Remaining value) in the slot popup to enter a 0–100 value; stored in localStorage per printer & slot (prism-anycubic-filament-pct-<printer>), shown as a badge in both side and front views.

Other fixes / options

  • Printer image dimming bug: the dimmed filter (brightness(0.4)) was applied whenever the light wasn't "on" — but Anycubic Cloud has no light entity, so the image was always darkened. Dimming now applies only when a light entity is actually configured. Added printer_image_opacity slider.
  • Cover progress % badge toggle (show_cover_progress_percent).
  • Job chip icon alignment: ha-icon is now flex-centered inside the chips.

Files

  • custom-components/prism-anycubic.js (new) + identical copies in dist/ and www/custom-components/
  • dist/prism-dashboard.js & www/custom-components/prism-dashboard.js — re-synced bundle (CRLF, IIFE-wrapped section)
  • www/custom-components/images/anycubic-kobra-x.png — printer artwork
  • README.md, custom-components/README.md, info.md — docs updated to list the new card

Notes / testing

  • All touched JS files validated with node --check.
  • Bundle copies kept byte-identical with the single-file sources; the prism-anycubic IIFE section in prism-dashboard.js re-synced with CRLF line endings.
  • Default values preserve previous behavior (full opacity; sensible default positions), so existing setups are unaffected.

…ancements

New prism-anycubic card for Anycubic Cloud printers, plus several display/UX improvements driven by real-world use.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant