G’day brains trust,
I’m beating my head against a wall a bit trying to work out how to create an override for an off delay timer. I have a real momentary switch to toggle a water tank pump - gpio input. A ‘virtual’ switch, gpio output controls the relay to the pump which also runs a 6 minute timer (as long as there is at least 5% capacity in the tank).
What’s the simplest way to create an override to bypass the off delay timer so I can empty the tank for periodic cleaning, rather than just keep toggling until it’s empty?
I was thinking of turning to scripting but not sure that will work with the toggle.
Appreciate any ideas
- platform: gpio
pin:
number: 25
mode:
input: true
pulldown: true
name: "Tank Pump Push Button"
id: pump_pb
on_press:
then:
- switch.toggle: tank_pump_switch
- platform: gpio
name: "Tank Pump Switch"
id: tank_pump_switch
pin: GPIO32
on_turn_on:
- while:
condition:
sensor.in_range:
id: tank_level
above: 5.0
then:
- switch.turn_off: dht_switch
- component.suspend: light_level
- delay: 360s
- switch.turn_off: tank_pump_switch
on_turn_off:
then:
- delay: 5s
- switch.turn_on: dht_switch
- component.resume: light_level