RESTful Sensor format incoming body (GET)

Hello!
Sorry my bad English!!:confounded:

I have a trouble in formatting data incoming from a GET request,
i have this tipe of incoming body
[“2345”]

I need only the number inside the “”, it’s the watt produced by solar panel

I would use the RESTful Sensor:

sensor:
  - platform: rest
    resource: http://blynk-cloud.com/f4xxxf578xxx59dxxxcf9/get/V0
    method: GET

the reference for this API is there: https://blynkapi.docs.apiary.io/#reference/0/get-pin-value/get-pin-value

I’m newby in json text…

Thanks so much!!

I think this is just an array with one item, so

   value_template:  {{ value_json[0] }}

should extract the first element.

1 Like

thank you!! Now all works fine!!

1 Like