Im playing around with the ui editor. So I made a script and I want to give a switch, which I placed with the editor, a function when the switch is flicked (true/false). If I'm using the action field in the editor, the function is called every time, doesn't matter if I switched on or of. Somehow I cannot figure out how to reference exactly this switch im there where more than on. Can somebody explain it in a easy way?
def switched(sender):
if sender.value == True:
iota_ticker(sw)
ui.load_view('tickerV2').present('sheet') < I would like to use this view with a switch
sw = ui.Switch(action = switched)
sw.present('sheet')
