Hi, I am trying to parse this with a rest sensor and get the value of “statusSeverityDescription” as sensor value. I can’t seem to get it to work. The live api is available here: https://api.tfl.gov.uk/Line/tram/Status
[{"$type":"Tfl.Api.Presentation.Entities.Line, Tfl.Api.Presentation.Entities","id":"tram","name":"Tram","modeName":"tram","disruptions":[],"created":"2022-01-18T15:07:11.55Z","modified":"2022-01-18T15:07:11.55Z","lineStatuses":[{"$type":"Tfl.Api.Presentation.Entities.LineStatus, Tfl.Api.Presentation.Entities","id":0,"statusSeverity":10,"statusSeverityDescription":"Good Service","created":"0001-01-01T00:00:00","validityPeriods":[]}],"routeSections":[],"serviceTypes":[{"$type":"Tfl.Api.Presentation.Entities.LineServiceTypeInfo, Tfl.Api.Presentation.Entities","name":"Regular","uri":"/Line/Route?ids=Tram&serviceTypes=Regular"}],"crowding":{"$type":"Tfl.Api.Presentation.Entities.Crowding, Tfl.Api.Presentation.Entities"}}]
I have tried with this:
- platform: rest
name: tram_status
resource: https://api.tfl.gov.uk/Line/tram/Status
value_template: "{{ value_json.x[0].lineStatuses[0].statusSeverityDescription }}"
scan_interval: 15