Hi,
I’m trying to define a sensor to be updated every hour to get the river level close to my house. The source is an API providing a JSON output (https://hubeau.eaufrance.fr/api/v1/hydrometrie/observations_tr?code_entite=V453001002&size=1&pretty&grandeur_hydro=H&fields=date_obs,resultat_obs,continuite_obs_hydro).
I’m trying it by simply create a sensor:
- platform: rest
name: River Deep
scan_interval: 1200
resource: https://hubeau.eaufrance.fr/api/v1/hydrometrie/observations_tr?code_entite=V453001002&size=1&pretty&grandeur_hydro=H&fields=date_obs,resultat_obs,continuite_obs_hydro
value_template: '{{ value_json.resultat_obs }}'
unit_of_measurement: "m"
I’m not an expert on JSON! And this code is not returning anything.
Thanks in advance for your help