Get once trigger in blockly
It would be great to have a once trigger in blockly to do something like:
try to close the blind... ohh... its unreach.... then wait till is reachable an than close the blind.
let subscription = on({ id: [].concat(['alias.0.Büro.Rollladen.UNREACH']), val: false }, async (obj) => { now close the blind unsubscribe(subscription); });
Maybe we can add a stopTrigger blockly. Than all triggers must have a name and every new trigger creates a stopTrigger block. Like variables or so.... Than you can stop a trigger from everywhere.
That feature is already implemented in JavaScript / Sandbox, but not documented. TODO:
- Add documentation
- Add Blockly block for
once
https://github.com/ioBroker/ioBroker.javascript/blob/a0eaa96c2e4398064dfe521bb27c84d8fc765843/lib/sandbox.js#L1479-L1497