Creating 1 webCoRe piston to replace 2 existing pistons

I'm attempting to create a new piston to replace the 2 pistons I'm currently using. If I can figure it out, I have a bunch of similar pistons I want to replace, effectively reducing the number of pistons I have significantly. Here it is as currently configured. Please note, I haven't run it yet. I want to make sure I'm doing it correctly before I activate it. Don't want to get yelled at because the heat isn't on when my wife gets up for work.

Here is the test log:

10/21/2022, 12:21:16 PM +553ms
+4ms ╔Received event [Hubitat 227].test = 1666369276553 with a delay of 1ms, canQueue: true, calledMyself: false
+11ms ║RunTime initialize > 10 LockT > 1ms > r9T > 2ms > pistonT > 1ms (first state access 7 5 5)
+14ms ║Runtime (7083 bytes) initialized in 2ms (v0.3.114.20220928_HE)
+18ms ║╔Execution stage started
+24ms ║║Comparison (string) :7c76bcf13f4437d56396ddf04776b595: is (string) :5fd38bb05278864e858c60e0d78f1eb4: = false (1ms)
+25ms ║║Condition #1 evaluated false (5ms)
+26ms ║║Piston execution aborted due to restrictions in effect; updating piston states
+30ms ║║Comparison (time) 44476000 happens_daily_at (time) 16200000 = false (1ms)
+33ms ║║Canceling statement #4's schedules...4 (st:0)
+37ms ║║Requesting time schedule wake up at Sat, Oct 22 2022 @ 4:30:00 AM EDT (in 58123410ms) for 4 (st:0)
+42ms ║║Comparison (enum) heat is (string) heat = true (1ms)
+48ms ║║Comparison (time) 44476000 happens_daily_at (time) 16200000 = false (0ms)
+50ms ║║Canceling statement #11's schedules...11 (st:0)
+56ms ║║Requesting time schedule wake up at Sat, Oct 22 2022 @ 4:30:00 AM EDT (in 58123392ms) for 11 (st:0)
+61ms ║║Comparison (enum) heat is (string) cool = false (1ms)
+92ms ║╚Execution stage complete. (75ms)
+127ms ║Setting up scheduled job for Sat, Oct 22 2022 @ 4:30:00 AM EDT (in 58123380ms),with 1 more job pending
+129ms ╚Event processed successfully (126ms)

At first glance, you are nesting identical triggers. At 4:30:00am, the first trigger (#4) is true. When it gets to the second trigger (#11) - even a few milliseconds later - it cannot possibly be transitioning to 4:30:00 again.

A quick fix would be (pardon the pseudocode):

If (time happens daily at 4:30:00, but only on Saturday)
   Then If (Thermostat mode is heat)
      Then do stuff
   End if
   Else If (Thermostat mode is cool)
      Then do other stuff
   End if
End if
1 Like

I totally get what you're doing. I would use the times as a trigger and the heat/cool as conditions. I avoid using wait as much as possible. By the time the wait time is up, the trigger or condition may no longer be true.

I do something similar, btw. I work from home and the house is warmer in the winter when my wife is working from home. I handled it slightly differently, but the idea is the same. I have an Ecobee and use different comfort settings. I basically just set it to the 'everyone is home in the evening' setting when she's home during the day. If she happens to come home early or leave late, it adjusts accordingly.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.