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.
P.s. If you have reasonable suggestions, please do not hesitate to offer. PRs are also welcomed.