How to implement RTH after empty spray tank

I wrote a basic guide for a version of that sensor and using it with lua a while ago. It was the V version not the pnp so you might need to tweak the wiring and set the button function to RTL.