Bambu Lab Printer WLED Presets

I tried to use existing blueprints and it was not working at all or was working partially. E.g. my printer has never triggered lidar related states therefor light was not turned off during scanning. So I decided to make my own blueprint.

This blueprint is more flexible and much more powerful as allows user to set not only LED strip color, but also effects and even gives possibility to use segments of a LED strip. The downside of this approach is that this requires more actions from the user.

The main idea is to create corresponding presents for your WLED light and activate them according to print state, current stage and chamber light entities. Basically what you need to do is create presents for each print state and current stage sensors` states that you want to handle.

E.g. I created following presets for my WLED light:

  • auto_bed_leveling
  • failed
  • finish
  • idle
  • init
  • offline
  • pause
  • prepare
  • printing
  • running

Now when print state or current stage sensor changes its state to new one that has corresponding preset, this preset will be applied. If there is no corresponding preset then nothing is going to be changed.

Also WLED on/off state will correspond to chamber light entity. When you turn it on/off the WLED light will turn on/off too. In case printer is in a finish state turning off the chamber light or opening/closing enclosure door is going to switch preset to idle. This is configurable if you don’t want to wait for finish to idle timeout.

After printer finishes print job automation will wait for certain timeout and switch light to idle mode. You can set this parameter yourself, by default it is 1 hour.

Each present represents one of the states of the print state and current stage. Some of them possible can be duplicates, e.g. printing/running/idle. You can also create segments and save your present for specific segments in this case only part of a LED strip will represent printer’s state.

Make sure preset name correspond to a particular sensor state (not its representation, usually underscore lowercase, e.g. auto_bed_leveling and not Auto bed leveling as it is presented in UI).

Make sure you restart WLED integration each time you created/renamed a preset as these options will be loaded only after integration restart.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

P.s. If you have reasonable suggestions, please do not hesitate to offer. PRs are also welcomed.

You can check all possible values for the sensors by inspecting their state in a Home Assistant Dev Tools. They have attribute called options with all possible state options. E.g.

Print status values:
{{ state_attr('sensor.bambu_lab_x1c_print_status', 'options') }}

Current stage values:
{{ state_attr('sensor.bambu_lab_x1c_current_stage', 'options') }}

Hi
I’ve been trying to get this automation to work for days. It doesn’t show me any status. I’ve restarted the HA several times. Nothing will change. What am I doing wrong? WLED can be controlled via HA .The color doesn’t change when heating or neviling. The only thing that works is that I can turn the light on and off via the printer.

@DerGnom

  1. Can you select presets manually from HA? The entity name should be called something like select.xxx_preset.
  2. Are you getting updates for Print status and Current stage sensors in HA? You can check history for corresponding sensor, something like sensor.bambu_lab_x1c_print_status and sensor.bambu_lab_x1c_current_stage.
  3. Did you name wled presets using exactly the same names (it is case sensitive) as available options of print_status or current_stage sensor? You should have at least idle (lights on) preset and possible running, but you can create more.

It was my mistake. Since my English is already 30 years old, I translated it incorrectly and thus used the wrong variable.

Great! So did you manage to make it work?

Yes, it works perfectly!!
Thanks.

Now I’m going to build a status bar to show the progress. An external LED column next to the printer or above it depending on your taste
0-10% red 1 LED
10-20% red 2 LEDs
20-30% red 3 LEDs
30-40% red 4 LEDs

40-50% orange 1 LED, etc.

up to 100% green LED

But first I have to figure out where to get the data from.

I think you can utilize sensor.bambu_lab_x1c_print_progress sensor )

Yes, that’s exactly the sensor I’d use. I just don’t have the knowledge to implement it. I’ll have to see about that first.