The value of ‘{{trigger.entity_id.split(’.’)[1].split(’’)[0]’ is ‘bureau’. How to parametrize the value ?
Something like :
value: "{{ states ('input_number.consigne_eco’trigger.entity_id.split(’.’)[1].split(’_’)[0]) }}"
The tilde (~) concatenates strings. Even if you provide numbers, they will be handled as strings.
The plus sign (+) adds numbers. If there are no numbers, only strings, they will be concatenated. However, an error will occur if there is a mix of numbers and strings.
Notice the difference in how the two operators, ~ and +, behave:
If I add the template {{ 56 + 'cat' }} it results in an error because I am instructing it to add a number to a string.