Here’s a question , imagine upthermoswitch has been off for a whole hour, and this event hasn’t been triggered since upstairs heat was “off”. If upstairs heat is now turned on will this trigger, I suspect it will ? If it does, suggestions as to how to modify it elegantly to ensure it only triggers if this is true in first minute. I can think of a way using a second virtual switch but it’s clumsy.
Following up on my on post I can confirm my suspicion , I did a test on different devices but the same scenario.
Not only does the condition “off x mins” eval to true on first execution when it’s over x mins, it will be true for every time greater than x mins.
If another clause in the if predicate becomes true it will then execute multiple times. It would be solved by SmartThings allowing =x mins and >= x mins in the predicate.
I could I suppose create a virtual switch, trigger it to on and then turn it off after 1 min, and then make the logic check based on the virtual switch, but that’s much more clumsy and trying to use this approach was trying to find a more elegant solution than current, messing about with a second virtual switch spoils that goal.
I haven’t grasped what it is you are actually trying to achieve.
It sounds like when UpThermoSwitch is turned off nothing will happen for a minute to allow for a change of plan, and then there is a one minute window during which Upstairs Heat will be forced off if is already on or is turned on?
Or does the Upstairs Heat changing to on have to happen in that second minute?
What happens then? How does UpThermoSwitch turn on again and does that trigger anything?
I guess what I wondering is if you could turn the UpThermoSwitch back on after two minutes instead of using another virtual switch.
Upthermoswitch is intended to be a flexible scheduling device .
When the upthermoswitch is on some routines driven by a thermostat switch the heat on and off.
I can easily set 3 time periods for this switch to be active (on) without needing to build the times into every routine. In theory it is more modular, and easier to maintain
, and stops routine duplications for differing time periods.
Once upthermoswitch closes the time period is over, and if the heating is still running I want to switch it off. However I want to be able to turn it on later as a manual override without this routine turning off the heat.
Does that help explain?
Possibly. It is the ‘If it does, suggestions as to how to modify it elegantly to ensure it only triggers if this is true in first minute.’ that has been confusing me. It still is a bit. It seems like it was simpler than I thought and you just wanted to make sure the UpThermoSwitch stayed off for a minute before you did anything.
The ‘off for 1 minute’ is going to trigger the routine once when that becomes true so I don’t really get why you care whether the heating is already on or not when that happens. Or if you do care why you don’t make it a ‘precondition’ so it doesn’t trigger the Routine itself.
I don’t like the term ‘precondition’ as it makes it sound like enables or disables the rest of the conditions rather than just preventing the ‘then’ executing. One of the big flaws of the app history is that you aren’t told when Routines were triggered but chose not to do anything, which is just as important as when they do.
Here is the thermostat heating control routine. There’s no time condition in it. The upthermoswitch is used to ensure the heating only ever is switchedon during the needed periods
here is the upthermoswitch timing control which is using the power on and off control. It’s nice and visual and means the timing control for all parts of the day is configured here.
There’s also a routine to switch heating off once it’s warm enough during the period. However if the heating is still on atthe end of the period i want it turned off then, but only then. So I can run the heating manually outside the heating window.
I dont see how that works? The innermost clause in parentheses needs to be false only once so that the not around it make it evaluate to true. When switch a is on it would evaluate to false so won’t have the desired effect.
Following up again on my own post. I think the “solution” here is to remove the condition “upstairs heat on” from the trigger condition of the routine.
This irks me a little as I’d always try to code stuff such that things only execute that change a state or actually do something. Removing this will mean the routine could trigger to switch the heat off when it’s already off, but won’t have the issue I described below.



