Hello there
I’m unable to parse some easy restful API calls and I dont know why.
http://transport.opendata.ch/v1/locations?query=8500010
Ill try to extract different values from this request but It’s not working. The error i get is:
UndefinedError: ‘value_json’ is undefined
I tried so many different things but nothing seems to work:
resource: http://transport.opendata.ch/v1/locations?query=8500010 name: Stationboard value_template: "{{ value_json.stations}}"
I tried with
value_template: “{{ value_json.stations.name}}”
value_template: “{{ value_json[0].stations}}”
and so on.
My goal is to read out some Train Departures like this:
http://transport.opendata.ch/v1/connections?from=Lausanne&to=Genève
So this is way bigger and thats the one i plan to use, but aswell im not able to get any response.
Further, If this should work someday how can i parse the Date I recive? f.g.
* departure: "2021-05-04T18:12:00+0200",
It would be nice if we have the european style: 04-05-2021 and if its not too much, because it queries always the next connection, i just need the time settings without the +0200 like 18:12:00
Thanks for the help!