Guys,
So this works…
- platform: rest
resource: https://api.open-meteo.com/v1/forecast?latitude=38&longitude=-77¤t_weather=true&timezone=auto
method: GET
scan_interval: 1260
name: "openmeteo_current_weather GNSS test 1"
value_template: '{{ value_json["current_weather"].temperature }}'
BUT this does not:
- platform: rest
resource: https://api.open-meteo.com/v1/forecast?latitude={{ states('sensor.esp_32_ver_1_gps_latitude') }}&longitude={{ states('sensor.esp_32_ver_1_gps_longitude') }}¤t_weather=true&timezone=auto
method: GET
scan_interval: 1260
name: "openmeteo_current_weather GNSS test 1"
value_template: '{{ value_json["current_weather"].temperature }}'
So here’s the thing, I copy and paste the resource API request to the template editor and a legitimate and coordinate populated URL comes up. I copy and paste that generated URL and I get values.
BUT when I check the STATES under developer tools, a centigrade temperature goes to UNKNOWN when I use the sensor input to generate the URL for the API request, even when the template tool gives me a correct URL and the copy and paste method works.
How can open meteo tell the difference in the URL API request from an actual number coordinate to a coordinate that has been generated by a sensor, and the template return correct coordinates and copy and paste generates JSON.
I don’t understand.
The plan is to have weather updates generated by GPS sensor input.
Thanks to all.
