Hello to you !
good, with your comments and help, I was able to start and move forward.
I did something basic, and it works in the timeline.
however, I expose myself to operating anomalies if I intervene and change data.
Here is my “code” and I explain myself:
"
alias: AUTOMATISATION FILTRATION ETE
description: “”
trigger:
- platform: state
entity_id:
- input_boolean.filtration_ete
from: “off”
to: “on”
condition: []
action:
- type: turn_on
device_id: 1ea6475bc6b42120527e9f592682a298
entity_id: switch.switch_pompe
domain: switch
- delay:
hours: 0
minutes: 0
seconds: 5
milliseconds: 0
- type: turn_on
device_id: 8356bf47044fc0de7b1a1a36e45c06f5
entity_id: switch.4_relais_vitesses_pompe_l2
domain: switch
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
- if:
- type: is_not_open
condition: device
device_id: 12d1c1745e3eda555bc7d130958f3e47
entity_id: binary_sensor.contact_debit_tamper
domain: binary_sensor
then:
- type: turn_on
device_id: ea4d0240dffa6a7f93d3ae2d0bef5f7a
entity_id: switch.switch_regul_ph_cl
domain: switch
- condition: time
after: “08:00:00”
before: “20:00:00”
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
else:
- stop: ERREUR PAS DE DEBIT DETECTE
error: false
mode: single
"
so, as long as I don’t touch anything, it works.
as stated, I made the code logically in timeline: if that, then snap that, if that ok, then that… etc etc.
on the other hand, if one of the elements of my chronology changes state (and which would block in my chronological sequence), I would like it to react accordingly.
For example, if my binary_sensor.contact_debit_tamper goes is_open, switch.switch_regul_ph_cl should go turn_off, then switch.4_relais_vitesses_pompe_l2 too, then after 10 seconds, switch.switch_pompe too.
it will be the same procedure if I stop my
- input_boolean.filtration_ete
(pass in inverse from: “on” to: “off” )
also, this part:
else:
- stop: ERROR NO FLOW DETECTED
error: false
gives me nothing (feedback, information, action, notification, …)
well, I know it’s beginner level a bit boring I guess, and I’m sorry about that.
thank you in advance for your help !
Sylvain