Time-based Triggers, "Time is <item>"

  • Platform information:
    • Hardware: Synology DS920
    • OS: Docker
    • openHAB version: openhab 3.3.0 Release Build

Hello,

I have a rule (DSL) that is triggered by items like “Time is <item>” descripted here.

Because there are multiple DateTime-items, triggering on a group would be helpful.
Like Time is <Groupname> or Time is Member of <Groupname>.
If this is possible I can check via triggeringItem and a lot of checks are not neccessary.

Does this functionality exist and if so, how must the group be defined?

Thanks for your support
Ulf

rule "Rolladen hoch"
when
	Time is dtAutoSMinWE or 
	Time is dtAutoSMaxWE or 
	Time is dtAutoSMinAT or 
	Time is dtAutoSMaxAT or 
	Time is dtAutoPrivateAT or 
	Time is dtAutoPrivateWE or 
	Time is dtAutoSunOnAT or 
	Time is dtAutoSunOnWE or 
    ... 
then

    ...

end

This does not exist. For now, you’ll have to list each individually.

Thanks for the info, that’s what I was afraid of. :cry:

Hi Rich,
I am now adding time based triggers to my rollershutter widget (using Hans-Jörg Merks template [OH3] Main UI - main_widget - part 4 - The Rollershutter Card ).
So per shutter I need to have at least two rules and if different times on weekends are required than four. Having 18 Shutters sums up to quite some rules.

Would this be something for the wish-list for OH4 or is it technically not doable as the trigger syntax ("Time is Shutter_OG_Diele_Strasse_timeUp timeOnly") is different?
Cheers
Marco

You could add it to the wish list but you also don’t need a separate pair of rules for each if you use a different approach.

For example, you could use Time Based State Machine from the marketplace which will send a command to an Item based on the state and done metadata on a collection of date time Items. You can configure it so it sends the name of the shutter and direction it needs to move to an Item that triggers a rule to take that info and actually send the right command to the item.

You would just have two rules, only one if which you have to write yourself, and you’ll need to add some metadata one time to the date time Items you already have to create.

Hi,
i stumbled upon this reply and wonder if you could recommend a “Time Based State Machine” and point me to it. I am also struggeling with this topic and I am not clever enough to get a time picker plus rules working
kind regards
Joerg

Assuming OH 4.0 go to Settings → Automation → Rule Templates and you will find Time State Machine in the list of options to add. See Rules - Basic | openHAB for how to instantiate a rule based on a template. See Time Based State Machine [4.0.0.0;4.9.9.9] for the prerequisites and configuration and usage instructions.