Hello Everyone
I am currently stuck when trying to extract 3 values from the following API: https://aareguru.existenz.ch/v2018/current?city=bern
I am interested in the values “aare.temperature_prec”, “aare.flow” & “bueber.state”, which I would like to have as sensor and the sensors should be updated every 5 minutes.
My configuration looks like this:
sensor:
- platform: rest
name: aareguru
resource: https://aareguru.existenz.ch/v2018/current?city=bern
json_attributes:
- aare
- bueber
value_template: 'OK'.
scan_interval: 300
- platform: template
sensors:
aare_temperature:
friendly_name: Aare Temperature
entity_id: aare.temp
value_template: '{{ states.sensor.aareguru.attributes["aare"]["temperature_prec"] }'
device_class: temperature
unit_of_measurement: '°C
aare_flow:
friendly_name: Aare Flow
entity_id: aare.flow
value_template: '{{ states.sensor.aareguru.attributes["aare"]["flow"] }'
unit_of_measurement: 'm³/s
aare_bueber:
friendly_name: Aare Bueber
entity_id: aare.bueber
value_template: '{{ states.sensor.aareguru.attributes["bueber"]["state"] }'
The sensors are displayed, but only updated when Home Assistant is started. Nothing happens after that.
Can anyone help me what the issue might be?