API Request Example

Updated 1 min read

Overview

Example API request to get the temperature from a location
import requests

url = "https://api.open-meteo.com/v1/forecast?latitude=50.85&longitude=4.35&current_weather=true"

data = requests.get(url).json()

print(data["current_weather"]["temperature"])

SetValue("Local.Temperature", str(data["current_weather"]["temperature"]))
Something missing or wrong in this article? Contact us