How to extract info from cURL to sensor

Hi,

Could somebody help me trying to understand how could I extract information from curl query bellow.
Im intrested only the price value

curl -X GET “https://dashboard.elering.ee/api/nps/price/EE/current” -H “accept: /

sensor:
  - platform: rest
    resource: https://dashboard.elering.ee/api/nps/price/EE/current
    name: Elering
    value_template: "{{ value_json['data'][0]['price'] }}"
    unit_of_measurement: '€'
2 Likes

amazing! Thank you.

You probably know how I can insert that value to energy tariff on HA?

Not really, sorry. You may experiment with setting the unit_of_measurement to EUR/kWh or whatever is appropriate.

1 Like