No products in the cart.
I’ve managed to write this into the filter handler which works and prints “found lift” when I think that command. But I now want the program to return a value and exit but the “serve forever” part means I can kill my thread but it just starts up looping again.
How do I make it so the server exits cleanly and returns a required value once the command is detected?
def filter_handler(address,*args):
# print(f”{address}: {args}”)
if (address == “/com/lift”):
print(“Found lift”)