@droftarts I need some brainstorming here.
I thought about it a lot and the following scenario is working while the printer is idle:
idle && no filament -> press button to start loading filament
idle && filament present -> press button to start unloading filament
I think this is clear so far and working in the macro.
However there are two tricky situations need to be covered:
For case 1 we can use the original macro as filament is present, but I'm not sure how I could handle when print is paused with error. I have looked up all the available statuses and printer status is same when manually paused and when paused with error. I'm wondering what other parameter we could use this case to determine if the print was halted by error or manually.