RESTful Sensor - driving me nuts

I am trying to get a sensor working with the API from eiswarnung.de and I tried with the following config but I always get the error that the API key is missing.


# Sensor for Eiswarner
  - platform: rest
    name: s_eiswarnung_home
    resource: https://api.eiswarnung.de/
    headers:
      key: TheAPIKey
    method: POST
    payload: '{ "lat" : "49.1111",
      "lng" : "10.111" }'
    json_attributes:
      - success
      - message
      - callsLeft
      - callsDailyLimit
      - callsResetInSeconds
      - requestDate
      - forecastId
      - forecastText
      - forecastCity
      - forecastDate

What I am doing wrong?

1 Like

Maybe something like this? :wink:

# Sensor für Eiswarner
- platform: rest
  scan_interval: 7200
  name: eiswarnung
  resource: https://api.eiswarnung.de?key=supergeheim&lat=49.1111&lng=10.111
  json_attributes:
    - success
    - message
    - callsLeft
    - callsDailyLimit
    - callsResetInSeconds
    - result
  value_template: "{{ value_json.result.forecastText }}"
1 Like

Thanks again! Better safe than sorry :wink:

Nice API, I would like to see if we can make an integration from eiswarnung :smiley:

1 Like