@Spaceman_Spiff I am trying to build a script to monitor a bunch of items for lack of changes after various durations. However, I do not think that the clock is started when the rule is saved, just when the item changes? Is there a convenient way to start the timer when the rule is saved without sending a command? Maybe my architecture is bad…
Just post an update or a change to the item after the rule was loaded?
You can even use the HABApp internal
set_value (see docs) so this doesn’t event leave HABApp. If you want the
value_change you can just change the value to a temporary value and then change it back immediately.
def __init__(self): ... self.item = StringItem.get_item('asdf') self.run.soon(self.create_update) def create_update(self): self.item.oh_post_update('value') # with openHAB event self.item.post_value('value') # with HABApp internal event self.item.set_value('value') # without HABApp internal event
Ahh! Cool… I was thinking there had to be a more graceful way of doing this than sending commands to openhab and triggering other rules. I forgot that HABApp has its own items. Giving this a try today!