How to use several state triggers in pyscript?

The pyscript documentation states that (emphasisis mine)

A single function can have any or all of the decorator types specified, but at most one of each type.

Since I believe this is a technical limitation, is there a smart way to use several state triggers for one action?

I currently use something like but there may be a better way?

def group_salon(**data):

def sun_sun(**data):

def check_mode(data):

It depends entirely on what that “action” is. There’s nothing wrong with the way you’ve done it here. For other cases you could do:

def group_or_sun(**data):
1 Like