Il devait effectivement manquer une indentation car elle s'exécute mais dans la chronologie de l'exécution, j'ai le message suivant (j'ai créé tous les input_number et redémarré HA)
S"topped because a condition failed at 25 mars 2024 à 17:56:55 (runtime: 0.00 seconds)"
S"topped because a condition failed at 25 mars 2024 à 17:56:55 (runtime: 0.00 seconds)"
Code :
alias: Comptage Pompe Puisard
description: ""
trigger:
- platform: event
event_type: knx_event
condition:
- condition: template
value_template: "{{ trigger.event.data.destination == '9/2/7' }}"
action:
- choose:
- conditions:
- condition: template
value_template: "{{trigger.event.data.data[4] == 8 }}"
sequence:
- service: input_number.set_value
target:
entity_id: input_number.energie_puisard_hp_bleu
data:
value: |-
{{ (trigger.event.data.data[0] * 2**24) +
(trigger.event.data.data[1] * 2**16) +
(trigger.event.data.data[2] * 2**8) +
(trigger.event.data.data[3] * 2**0) }}
- conditions:
- condition: template
value_template: "{{trigger.event.data.data[4] == 9 }}"
sequence:
- service: input_number.set_value
target:
entity_id: input_number.energie_puisard_hp_blanc
data:
value: |-
{{ (trigger.event.data.data[0] * 2**24) +
(trigger.event.data.data[1] * 2**16) +
(trigger.event.data.data[2] * 2**8) +
(trigger.event.data.data[3] * 2**0) }}
- conditions:
- condition: template
value_template: "{{trigger.event.data.data[4] == 10 }}"
sequence:
- service: input_number.set_value
target:
entity_id: input_number.energie_puisard_hp_rouge
data:
value: |-
{{ (trigger.event.data.data[0] * 2**24) +
(trigger.event.data.data[1] * 2**16) +
(trigger.event.data.data[2] * 2**8) +
(trigger.event.data.data[3] * 2**0) }}
- conditions:
- condition: template
value_template: "{{trigger.event.data.data[4] == 5 }}"
sequence:
- service: input_number.set_value
target:
entity_id: input_number.energie_puisard_hc_bleu
data:
value: |-
{{ (trigger.event.data.data[0] * 2**24) +
(trigger.event.data.data[1] * 2**16) +
(trigger.event.data.data[2] * 2**8) +
(trigger.event.data.data[3] * 2**0) }}
- conditions:
- condition: template
value_template: "{{trigger.event.data.data[4] == 6 }}"
sequence:
- service: input_number.set_value
target:
entity_id: input_number.energie_puisard_hc_blanc
data:
value: |-
{{ (trigger.event.data.data[0] * 2**24) +
(trigger.event.data.data[1] * 2**16) +
(trigger.event.data.data[2] * 2**8) +
(trigger.event.data.data[3] * 2**0) }}
- conditions:
- condition: template
value_template: "{{trigger.event.data.data[4] == 7 }}"
sequence:
- service: input_number.set_value
target:
entity_id: input_number.energie_puisard_hc_rouge
data:
value: |-
{{ (trigger.event.data.data[0] * 2**24) +
(trigger.event.data.data[1] * 2**16) +
(trigger.event.data.data[2] * 2**8) +
(trigger.event.data.data[3] * 2**0) }}
mode: single