-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
The logic for the prevention of dry-running is not working correctly.
If there is water in the bottle, the sensor for "fluid_input_sensor" is "on" and so the pump will not even start because of the last
"if" condition.
- id: pump_safety_check
mode: restart
then:
- while:
condition:
- switch.is_on: pump_control
then:
- if:
condition:
- and:
- switch.is_on: stop_pump_when_full
- binary_sensor.is_on: fulid_output_sensor
then:
- logger.log: "Pump stopping - tank full"
- switch.turn_off: pump_control
- if:
condition:
- lambda: |-
if (id(pump_start_time) == 0) return false;
uint32_t runtime = (millis() - id(pump_start_time)) / 1000;
return runtime > id(max_safe_run_time).state && !id(pump_safety_override).state;
then:
- logger.log: "Pump stopping - safety"
- switch.turn_off: pump_control
- if:
condition:
- and:
- switch.is_on: stop_pump_when_dry
- binary_sensor.is_on: fluid_input_sensor
then:
- logger.log: "Pump stopping - input dry"
- switch.turn_off: pump_control
- delay: 1s
Metadata
Metadata
Assignees
Labels
No labels