Blockly - How many times a timer has been rescheduled


Sorry, questions coming thick and fast now.

I’ve implemented a timer in a rule where it is rescheduled if the item receives a command, works perfectly.

Is there a way in Blockly to have a count on the number of times the rule is reset and then use it to tell the rule to no longer reschedule the timer and / or then do something else / move onto the next bit of the rule?

There is nothing out of the box for this specific requirement, but you can build something on your own.

Within blockly, look at openhab → value storage and you can define a variable that will be available across multiple instances of the same rule and you can build your own counter.

Just be aware, that the variable will be reset everytime you save the rule out restart openhab

1 Like

Awesome, thanks for the tips, I’ll investigate and have a read / absorb the Blockly template creation.

I’ve got a few other ideas for some templates so, that might be my next thing to focus on.