Add prism-anycubic card (hass-anycubic_cloud) with ACE support & job-info enhancements - #48
Open
Itstommy10 wants to merge 1 commit into
Open
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds a brand-new
prism-anycubiccard for Anycubic Cloud printers (via the hass-anycubic_cloud integration), cloned and adapted fromprism-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-anycubicSupported printers: Kobra X, Kobra 3 / 3 Max / 3 Combo, Kobra 2 series, Kobra S1 and other Anycubic Cloud devices.
translation_key(collision-free, since the integration useshas_entity_name=True), with anentity_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.job_time_remaining/job_time_elapsedare in minutes (not seconds/hours).sensor.<printer>_ace_spools→spool_infolist (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.hasAuxFan/hasCaseFan/hasChamber, optional user-configuredlight_switch/camera_entity).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_state→ Printing / Paused / Idle / Error / Downloading / …)job_progress)job_time_remaining)job_time_elapsed)print_speed_mode, falls back toprint_speed_pctas%)image.<printer>_job_preview), whose state is the last-update timestamp → formatteddd/mm/yyCover image (job preview) improvements
cover_image_position— vertical position (% from bottom) to align with the print bedcover_image_position_h— horizontal position (% from left)cover_image_opacity— preview opacityFilament percentage (manual)
Since ACE exposes no remaining-percentage, the value is now manual & optional:
show_filament_percent.localStorageper printer & slot (prism-anycubic-filament-pct-<printer>), shown as a badge in both side and front views.Other fixes / options
dimmedfilter (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. Addedprinter_image_opacityslider.show_cover_progress_percent).ha-iconis now flex-centered inside the chips.Files
custom-components/prism-anycubic.js(new) + identical copies indist/andwww/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 artworkREADME.md,custom-components/README.md,info.md— docs updated to list the new cardNotes / testing
node --check.prism-anycubicIIFE section inprism-dashboard.jsre-synced with CRLF line endings.