Temperature check for pool pump

First, as your HA grows you might find more cases where you want to do things base on time or solar events (sunrise, sunset). I recommend the Time of Day Design Pattern to centralize that sort of logic.

You cannot trigger a rule with a conditional like that. You instead need to:

when
    Item Weather_Temperature changed
then
    if(Weather_Temperature.state < 1.7) {

Beyond that your approach is sound. The next step might be to add some persistence so the last state the pump was in when OH went down gets restored when OH comes back up. Then have a System started rule that sends the appropriate command to the pump based on what time it is.

I recommend this because if by chance OH goes down at 06:29 and doesn’t come back up until after 06:31 the pump will never be turned on. Similarly for the off rule. With a System started rule that figures out what time it is and what state the pump is supposed to be in you will be able to send the command to turn on/off the pump even if OH is down during the deadline.

The Time of Day pattern above should give you the example you need to do this.

1 Like