Date time issues with Rest

Hello good folks!

After messing around with this for more then two days I’ve decided to ask the experts.

I’m retrieving a datetime object from a JSON Url. The return is quite simple and standard:


It’s the date when the garbage is collected and us being all ADHD want to get notified. Anyway, I’ve added the following Rest sensor to the configuration.yaml:

  - resource:<My postal code>&houseNumber=<my housenumber>&addition=
    scan_interval: 600
      - name: "Ophaaldatum"
        #state: '{{ as_timestamp(value_json[0].date) | timestamp_custom("%A %-d %B") }}'
        #device_class: timestamp
        unique_id: rovasensorophaaldatum
        value_template: '{{ ((value_json[0].date)|as_datetime).strftime("%A %-d %B") }}'
      - name: "Afvaltype"
        unique_id: rovasensorafvaltype
        value_template: '{{ value_json[0].garbageType }}'

But whatever I do, I cannot get the returned date to be an actual date to use in the Trigger using a “Time” based trigger (e.g. One day in advanced send a message or whatever).

How do I turn this returned JSON object in a usuable time/date object? Thanks!