Hi,
I’ve created an automation that gets triggered by MQTT.
I added two actions to this automation.
The value that needs to be set to the input number is calculated by a template.
The problem is that always only the first action triggers.
I don’t know if this is important but when the seconds action needs to be triggered the if condition in the first value is false.
here is my automation:
alias: Audio volume update
description: ''
trigger:
- platform: mqtt
topic: Audio/Status
condition: []
action:
- service: input_number.set_value
data:
value: "{% if trigger.payload[5:-1].split(',') [0] | int == 3 %}\n {{ trigger.payload[5:-1].split(',')\
\ [1] | int }}\n{% endif %}"
entity_id: input_number.zone3_volume
- service: input_number.set_value
data:
value: "{% if trigger.payload[5:-1].split(',') [0] | int == 6 %}\n {{ trigger.payload[5:-1].split(',')\
\ [1] | int }}\n{% endif %}"
entity_id: input_number.zone6_volume
mode: single
What could be the problem here?