Hi,
sometimes things happen like.
Please turn on the heating today and just today at 14:00
Or Turn of the TV today at 15:00
But as mentioned really today and not recurring.
Has anyone an elegant idea how to set this?
Thanks
/FranzS
Hi,
sometimes things happen like.
Please turn on the heating today and just today at 14:00
Or Turn of the TV today at 15:00
But as mentioned really today and not recurring.
Has anyone an elegant idea how to set this?
Thanks
/FranzS
One of the time based rule trigger options is the time specified by a DateTime Item. When you create a rule with that kind of trigger you can select whether the rule only has to match the time of the Item State (triggers every day at the same time) or must match both the date and time (triggers once only at that time on that day). At that point, setting the moment for your thing to happen is as easy as changing the DateTime Item.
This is probably the easiest way to achieve your goal.
cron trigger and set a âdoneâ variable when executed.
Begin the rule with a check for that variable, return (= stop executing) when set
Lots of people have different definitions for the word elegant, so I canât say if any of these ideas match your definition.
The suggestions so far are great if you are likely to need to do this more than once (e.g. maybe three times a week youâll want to turn off the TV at a certain time) or a command you can set up ahead of time (e.g. youâll need to set up Items/rules for specific Items ahead of time). Iâm going to focus on the truly ad hoc event though. You donât know the Item nor the time ahead of time.
Use the iCal add-on and add these one off scheduled tasks to the calendar of your choice.
Just manually create a one time use rule to do the thing at the right time of day when you realize you need to do it. You can even have the rule disable itself as the last action it takes so you donât have to remember to do so yourself. Another rule can come along and remove the disabled rules at midnight for cleanup.
Rely upon stuff outside of OH. Many TVs will have a timer function built in. Simple automations can be done through Alexa/Google/Homekit. For example, I might say âhey google, turn off the family room lights at 8:30 pmâ and Google Assistant/Gemini will hold and execute the scheduled event.
Set up a UI widget that sets a DateTime Item and the name of an Item to command and the command to send. A rule gets triggered by the DateTime Item and sends the command to the Item with the Item name. With some work and some bookkeeping it should be made so you can have more than one scheduled time/Item/command combo.
Using the audio and voice config for openHAB, you can set up a rule to process speach to text and schedule a command for a certain time. The rule shouldnât be super complex to write but there are enough edge cases I wouldnât call it elegant.
Thanks all for your inputs.
Iâve used for now a Cron rule that fires only once like:
0 38 15 19 11 ? 2025
Also the tip with the Voice assistant was great!
Thank you friends!
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.