Hello everyone,
i would like to reformat the return value of a sensor. the sensor returns the value
“Gelsenkirchen Wertstofftonne mit zweiwöchentlicher Abfuhr in 12 tagen”
the result should be:
“Wertstofftonne Abfuhr in 12 Tagen”
I use the following filter:
value_template: “{{ states(‘sensor.next_pickup’).split(‘Gelsenkirchen’)[1].split()[-4:] | join(’ ') }}”
However, this filter only returns the result “Abfuhr in 12 tagen”; the join is therefore missing.
Any hints?