Hello,
I have a sensor that updates with different filenames that contain material. Because the file name is different all the time but the material mentioned as “wood”, “metal”, “plastic” etc. is always the same.
Is there any possibility to retrieve part of the text with a filtering or do I have to forward the value in the sensor to a new sensor or similar?
At least I have managed to create an automation that detects what material is in the sensor but I do not know how to bypass or set a new sensor with values…or maybe this is not the right way to go?
conditions:
- condition: template
value_template: “{{ ‘Metal’ in states(‘sensor.material_file’) }}”
Thank you!