Sensor Definition using platform: File to read line of an updating file

Hi there,
This sensor in my sensor.yaml was working up till release 2023.5 but now it’s giving an undefined error and I can’t seem to understand what is not working.

I’ve looked for breaking changes that might have impacted my change, but don’t see the issue…

I’ve tried in the Developer Template but also get undefined value…

  - platform: file
    name: Sump_Pump_Run
    file_path: /config/sumppump/neocam.txt
    value_template: '{{ as_timestamp(as_local(as_datetime((value.split("|")[0])[0:26]+"-00:00")))| timestamp_custom("%d-%b %-I:%M %p") }}'
    unit_of_measurement: ""

because you have a unit_of_measurement but your result is not a number. Remove unit_of_measurement.

@petro Thank you… got caught by that as it’s been working for about 2 years and didn’t see a breaking change that made sense to me… worked and makes sense… Many thanks