If you haven't already, install Bambu Lab from HACS.
- (Optional) Create an "Input Select" Helper with options
1
,30
,50
. This is used as a default movement distance. - Create a new Script, switch to YAML mode and paste the contents of
bblab_move_axis.yaml
. - If you haven't created the input select helper, update the
distance
variable to{{ iif(is_number(distance), distance, 10) }}
so that the default movement is 10mm - Update the sensor IDs throughout the script to your own device, e.g.
sensor.p1s_print_status
You can either call the script as part of an automation, or add a button. The only variable requirement is direction
(up, down, left, right, forward, back).
Example template button:
# Move the print head backwards on the Y axis by 50mm (i.e. towards the rear of the machine)
type: custom:mushroom-template-card
primary: ""
secondary: ""
icon: mdi:arrow-up-thick
tap_action:
action: perform-action
perform_action: script.p1s_move_axis
data:
direction: back
distance: 50
grid_options:
columns: 2
rows: 1
Caution
This has only been tested on a P1S, it won't work on an A1 or A1 Mini. I also haven't tested this when there's multiple printers configured.