From a62d01aa79319423704ebc125fdfb78d5d7adba7 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Wed, 15 May 2024 11:13:39 +0100 Subject: [PATCH] Open bypass valve when turning pump on even when the roof is warm It *still* might be colder than the water temperature, and there's no harm in letting it keep warming up for another minute. Also stop writing the valve state to flash each time it changes. --- pool.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pool.yaml b/pool.yaml index 0d2ed72..81802dd 100644 --- a/pool.yaml +++ b/pool.yaml @@ -181,8 +181,9 @@ script: // Turn pump off if it's warm enough, between 7am and 10am (when it comes on anyway). if (t.hour > 7 && t.hour < 10 && outtemp >= 20.0 && !id(pool_pump).state) { - ESP_LOGD("control_value", "Roof temperature over 20°C. Turning pump on."); + ESP_LOGD("control_value", "Roof temperature over 20°C. Turning pump ON and valve OFF."); id(pool_pump).turn_on(); + id(valve_output).turn_off(); } return; } @@ -744,7 +745,7 @@ switch: #### To switch on and off the communication with the BLE device #### id: valve_output name: "Valve switch" pin: GPIO14 - restore_mode: RESTORE_DEFAULT_OFF + restore_mode: ALWAYS_OFF on_turn_on: then: - light.turn_on: green_led -- 2.50.1