Hi
I have been trying to convert a text string into a timestamp and if the text string is more than say 1 hour old to perform an action (send me a WhatsApp).
I can extract the text string using {{ states(‘sensor.web_scrape_weewx’) }}
The text string is of the format 15/08/24 08:35:00
I have tried all sorts of combinations of as_timestamp, strftime() and strptime() all and search these forums all to no avail.
So for example {{as_timestamp(states(‘sensor.web_scrape_weewx’))}} in template gives
ValueError: Template error: as_timestamp got invalid input '15/08/24 08:35:00' when rendering template '{{as_timestamp(states('sensor.web_scrape_weewx'))}}' but no default was specified
Any help or pointers appreciated.
lcsneil