I have a morning alarm sequence set in RM that is triggered at a specific time. If I need to alter the alarm time I just go into RM and adjust it and save the rule again. But ideally I would like the alarm time to somehow be adjustable through a dashboard control so that SHMBO can adjust it too. I was thinking about maybe somehow using a virtual dimmer level or a Global Variable, but before I put too much thought into it I wondered if anyone has already done something similar?
I looked for a way to do something like this and ended up using a virtual switch (which turns off after 500ms) and turning it on at specific times using automation in HomeKit (though you could do this in Alexa or Google as well).
How about a Number Global Variable with a connector, so that it can be used on a Dashboard. Then in your rule, it is triggered earlier than you need it, and it's first action is a delay, with the variable giving the time to delay. Variable delays are expressed in seconds, so a second variable could be used to do a multiply-by-60 on a variable value from the connector expressed in minutes.
For example. the trigger could be for 5:00 AM. The variable-connector could be set for 60 minutes. So the rule would actually do its thing at 6:00. Then, you want to change it to 6:30, so you change the connector value to 90. Etc.
"with a connector" sorry for maybe this stupid question but what is that?
But according my understanding you will need to calculate anyway the number of this connector to get the action at the desire time right? and to do this in a dahsboard I don't know but it sound complicated don't you think ?
Is not less complicated to make a new Tile with this feature? I mean a clock to trigger an action like to click a virtual switch or similar....
There may now be better ways of doing this as Bruce described above but my solution to this was as follows:
I have 2 virtual dimmers for Alarm time hour and Alarm time minute. I have them displayed on a dashboard as attributes showing level. I have a virtual button device with buttons set up to increase and decrease the hour by 1, and the minute by 5. I also have one that resets both hour and minute to our standard alarm time of 8:30 with a single button press (Don't judge us - we are both retired!) These buttons are arranged as shown on the dashboard. I have also added rules to stop the minutes going over 59 or the hour over 23
Dashboard display:
To get the time comparison I have created 2 Global Variables, GVcurrentMinute and GVcurrentHour. These are updated by a simple rule that runs every minute:
It may not be elegant, but it has worked flawlessly for months now.
I have recently added a physical Remotec 8 button remote to the alarm system with each button programmed to set the alarm to various times from 7.00 am onwards in 15 minute intervals so that we can quickly set it without even accessing the dashboard. It gives a TTS to announce the new alarm time so we know it has been adjusted.
It changes the variables to what has been set on the dashboard.
It just doesnot seem to Delay, then run the actions after the delay. I have removed all but the core element (example) and it still throws the error.
Help!, this seems such a huge leap forward and I wish to use it.
Thanks.
I wrote it last night, added "turn coffee pot on".(Start Morning=04:15)
It did not. I have been chasing my tail, and loving it, on and off durning the day.
Start Morning has been set from 00:02 to 04:15 and many in between.
After a while of setting the trigger to "a coule of min in the future" I have just been hitting "run actions".
And you cought me in between with the time descrepancy. Different runs on the rule and different settings on the dashboard. I would mention that the rule keeps reverting (when accessed from the apps menu) back to an older version, update rule restores the visual UI to the current version. Sorry it this is confusing. The local variables always follow the dashboard entry. Without fail.
Taking the variable out of the delay, just using 30 seconds elimenated the error.
and allowed the rule to complete.
Adding a system variable "STS" and equating it to "Start Time Seconds" then using %STS% in the delay has stepped thru (Run Actions) many times now and worked.
%Start Time Seconds% is to long for the input field????
Best guess I can offer.
Thanks.
This requires that a rule run every minute to check if the time has been reached. Bruce's rule above doesn't add that unnecessary overhead to the hub. This is a lot of unnecessary work.
That's true, but I haven't seen any slowing of my hub and it's been running like that for months. My hub is as snappy as it's ever been.
I'm very happy with how my solution works and it has the benefit that within a minute of a hub reboot/crash/update it's back on track. Also mine can adjust the target time at any point before it has fired and it will take effect.