# Turn them off and on again.
script.execute: bounce_1w_power
- # Turn pool pump on at 7am and off at 7pm
+ # Ensure the pool pump is on by 10am and off by 7pm
- seconds: 0
minutes: 0
hours: 10,19
id: pump_default
force: true
- # Before turning the pump on in the morning, both 'solar in'
- # both 'solar in' and 'solar out' sensors will be reading the
- # ambient temperature, as no water is flowing. So open the
- # bypass valve (pump directly back to pool) and set the
- # control_valve_last_change time so that the temperature logic
- # in the control_valve script won't close it again for at
- # least five minutes. By which time the 'solar in' sensor
- # should be giving *water* temperature, so we won't close the
- # valve until the roof genuinely is warmer than the
+ # Before turning the pump on in the morning, both 'solar in' and
+ # 'solar out' sensors will be reading their respective ambient
+ # temperatures, as no water is flowing. So open the bypass valve
+ # (pump directly back to pool) and set the control_valve_last_change
+ # time so that the temperature logic in the control_valve script
+ # won't close it again for at least five minutes. By which time the
+ # 'solar in' sensor should be giving *water* temperature, so we
+ # won't close the valve until the roof genuinely is warmer than the
# water. This means we don't use the pool water to heat up the
- # rubber and plastic sitting on the roof; let the *sun* do
- # that first!
+ # rubber and plastic sitting on the roof; let the *sun* do that
+ # first!
+ #
+ # This was most important when the pump was just coming on at 7am
+ # unconditionally. Now it doesn't come on until the roof gets to
+ # 20°C and only turns on unconditionally (for filtering purposes) at
+ # 10am. So do it at 09:59 *if* the pump isn't already running.
- seconds: 0
minutes: 59
- hours: 6
+ hours: 9
then:
lambda: |-
- id(control_valve_last_change) = ::time(NULL);
- id(valve_output).turn_off();
+ if (!id(pool_pump).state) {
+ id(control_valve_last_change) = ::time(NULL);
+ id(valve_output).turn_off();
+ }
on_time_sync:
then: