Hi to all,
I’m trying to make an automation for constant filling my barrel for garden irrigation. I have water pump for my well (switch), float sensor (switch), and temperature sensor. i need automation that will fill the barel up to the top (float sensor on), then wait for 30mins, then turn on pump to fill barrel again. And all this happening only if teperature is above 35 degrees Celsius.
I make automation to start when pump is on, if float switch is on then stop pump. But it only works only if pump is turned on and float is on. If float is off (which is normal when barel is empty
) and after a while float gets on, pump is still running. I know there is a simple way to do this right but I’m not so good at automation stuff so please help me ![]()
Hi back, If you post what you have, properly formatted using a code block </> we can help you fix it.
I don’t know if this is what you need but I’ll try:
alias: Pumpa bazena on off plovak
description: ""
triggers:
- type: turned_on
device_id: cf8bbd057dc78ee6bca4c83c230b57e5
entity_id: db83f0494565e9f0f09c91afa07d1adb
domain: switch
trigger: device
conditions:
- type: is_on
condition: device
device_id: 5f3c5b5815256a4174aca913d3333899
entity_id: 2eb33d0136d7cc5032470921cb28abf9
domain: binary_sensor
actions:
- type: turn_off
device_id: cf8bbd057dc78ee6bca4c83c230b57e5
entity_id: db83f0494565e9f0f09c91afa07d1adb
domain: switch
mode: single
Yes, but the first lesson is: avoid the device actions, conditions and templates. Besides this being hard to read, there are numerous things that will make it problematic for you later, and it is harder for is to modify this.
The entity ids shown here are not the entity_id’s that the UI shows. Can you tell us what is the id now for the trigger, condition and action? It now says if some thing is turned on, immediately turn something else off, but only if some other sensor is on. That isn’t saying much ![]()
I’ll try but my Ha is on Croatian and I have also write names on Croatian ![]()
Trigger device is water pump, entity is “when pump is turned on”. Condition is for ESP Home device which have entity Switch and when is on. And finally action is again Water pump and action is “Turn off the pump”.
I hope you’ll understand some of it ![]()
There’s always Google Translate. I Still would like the croation entity ids to write the right calls, so you don’t need tho replace them.
The problem is that you misinterpret what a trigger and condition do. A trigger is something happening (an instant). A condition is something being a certain way. So what is says now is: immediately when the pump is turned on, turn it off again, but only when the esp sensor is in some way.
I suspect you want it the other ways around. The trigger is the tank float turning on to signal it is full. That should turn the pump off. No conditions, because full is full.
ps. its bedtime for me now, so no answers for some time, got to work tomorrow…
I have made two automations. First is triggered by float switch. When switch is state ON then pump motor is stopped. It useful for not to overflow the barel.
Second automation is triggered when switch change state from ON to OFF. Then wait for 30mins and then start pump motor. This automation can be triggered only if ambient temperature is more than 33 degrees Celsius.
Those two automations are working in chain, second one fill the barel and then first turn off pump motor when barel is full.
Here is the first automation
alias: well pump level switch
description: ""
triggers:
- trigger: state
entity_id:
- binary_sensor.temp_vanjska_plovak
from: null
to: "on"
conditions: []
actions:
- type: turn_off
device_id: cf8bbd057dc78ee6bca4c83c230b57e5
entity_id: db83f0494565e9f0f09c91afa07d1adb
domain: switch
mode: single
and here is the second:
alias: well pump delay
description: ""
triggers:
- trigger: state
entity_id:
- binary_sensor.temp_vanjska_plovak
from: "on"
to: "off"
conditions:
- condition: numeric_state
entity_id: sensor.vanjska_temperatura
above: 33
actions:
- delay:
hours: 0
minutes: 30
seconds: 0
milliseconds: 0
- type: turn_on
device_id: cf8bbd057dc78ee6bca4c83c230b57e5
entity_id: db83f0494565e9f0f09c91afa07d1adb
domain: switch
mode: single