Trouble with REST sensor and timestamp

Hello ya all,

I’m trying to extract time form json and want it to convert it in a timestamp sensor. If I use it in developer tools, template, it works. Even if I convert unix time to readable time it’s correct. But the state of the sensor keep giving me “unknown”.

Does anyone know what I’m doing wrong? Even Chat GPT don’t know how to fix it :wink:.

rest:
    resource: http://api.aladhan.com/timingsByCity?city=Amsterdam&country=Netherlands&method=3
    scan_interval: 172800
    sensor:
      - name: pray_Fajr
        json_attributes:
          - Fajr
        value_template: "{{ value_json.Fajr }}"
        device_class: timestamp
      - name: pray_Dhuhr
        value_template: "{{ strptime(today_at(json['data']['timings']['Fajr'], '%H:%M')) | as_timestamp }}"
        device_class: timestamp


Timestamp is not the epoch timestamp

      - name: pray_Dhuhr
        value_template: "{{ today_at(value_json['data']['timings']['Fajr']) }}"
        device_class: timestamp

thank you sooooo much!