luz
Okey danke, das hat schon mal weiter geholfen. Allerdings klappt noch nicht alles daher muss ich nochmal Nachffrage. Das ist so richtig?
if (elements(weather.current.weather) = 3) {
message(format("S11=%.1f",weather.current.weather[0].id))
}
if (elements(weather.current.weather) = 3) {
message(format("S12=%.1f",weather.current[1].weather.main))
}
Was über die One Call API kommt sieht so aus.
{
"lat": 39.31,
"lon": -74.5,
"timezone": "America/New_York",
"timezone_offset": -18000,
"current": {
"dt": 1646318698,
"sunrise": 1646306882,
"sunset": 1646347929,
"temp": 282.21,
"feels_like": 278.41,
"pressure": 1014,
"humidity": 65,
"dew_point": 275.99,
"uvi": 2.55,
"clouds": 40,
"visibility": 10000,
"wind_speed": 8.75,
"wind_deg": 360,
"wind_gust": 13.89,
"weather": [
{
"id": 802,
"main": "Clouds",
"description": "scattered clouds",
"icon": "03d"
}
]
},
"minutely": [
{
"dt": 1646318700,
"precipitation": 0
},
...
},
"hourly": [
{
"dt": 1646316000,
"temp": 281.94,
"feels_like": 278.49,
"pressure": 1014,
"humidity": 67,
"dew_point": 276.16,
"uvi": 1.49,
"clouds": 52,
"visibility": 10000,
"wind_speed": 7.16,
"wind_deg": 313,
"wind_gust": 10.71,
"weather": [
{
"id": 803,
"main": "Clouds",
"description": "broken clouds",
"icon": "04d"
}
],
"pop": 0.03
},
...
}
"daily": [
{
"dt": 1646326800,
"sunrise": 1646306882,
"sunset": 1646347929,
"moonrise": 1646309880,
"moonset": 1646352120,
"moon_phase": 0.03,
"temp": {
"day": 281.63,
"min": 271.72,
"max": 282.21,
"night": 271.72,
"eve": 277.99,
"morn": 280.92
},
"feels_like": {
"day": 277.83,
"night": 264.72,
"eve": 273.35,
"morn": 277.66
},
"pressure": 1016,
"humidity": 55,
"dew_point": 273.12,
"wind_speed": 9.29,
"wind_deg": 3,
"wind_gust": 16.48,
"weather": [
{
"id": 500,
"main": "Rain",
"description": "light rain",
"icon": "10d"
}
],
"clouds": 49,
"pop": 0.25,
"rain": 0.11,
"uvi": 3.38
},
...
},
"alerts": [
{
"sender_name": "NWS Philadelphia - Mount Holly (New Jersey, Delaware, Southeastern Pennsylvania)",
"event": "Small Craft Advisory",
"start": 1646344800,
"end": 1646380800,
"description": "...SMALL CRAFT ADVISORY REMAINS IN EFFECT FROM 5 PM THIS\nAFTERNOON TO 3 AM EST FRIDAY...\n* WHAT...North winds 15 to 20 kt with gusts up to 25 kt and seas\n3 to 5 ft expected.\n* WHERE...Coastal waters from Little Egg Inlet to Great Egg\nInlet NJ out 20 nm, Coastal waters from Great Egg Inlet to\nCape May NJ out 20 nm and Coastal waters from Manasquan Inlet\nto Little Egg Inlet NJ out 20 nm.\n* WHEN...From 5 PM this afternoon to 3 AM EST Friday.\n* IMPACTS...Conditions will be hazardous to small craft.",
"tags": [
]
},
...
]
Wobei die "..." bedeutet dass da noch mehr ist. Als beispiel habe ich dir den auszug aus "weather.minutely".
"minutely":[{"dt":1682577300,"precipitation":0},{"dt":1682577360,"precipitation":0},{"dt":1682577420,"precipitation":0},{"dt":1682577480,"precipitation":0},{"dt":1682577540,"precipitation":0},{"dt":1682577600,"precipitation":0},{"dt":1682577660,"precipitation":0},{"dt":1682577720,"precipitation":0},{"dt":1682577780,"precipitation":0},{"dt":1682577840,"precipitation":0},{"dt":1682577900,"precipitation":0},{"dt":1682577960,"precipitation":0},{"dt":1682578020,"precipitation":0},{"dt":1682578080,"precipitation":0},{"dt":1682578140,"precipitation":0},{"dt":1682578200,"precipitation":0},{"dt":1682578260,"precipitation":0},{"dt":1682578320,"precipitation":0},{"dt":1682578380,"precipitation":0},{"dt":1682578440,"precipitation":0},{"dt":1682578500,"precipitation":0},{"dt":1682578560,"precipitation":0},{"dt":1682578620,"precipitation":0},{"dt":1682578680,"precipitation":0.1034},{"dt":1682578740,"precipitation":0.1092},{"dt":1682578800,"precipitation":0.115},{"dt":1682578860,"precipitation":0.112},{"dt":1682578920,"precipitation":0.109},{"dt":1682578980,"precipitation":0.106},{"dt":1682579040,"precipitation":0.103},{"dt":1682579100,"precipitation":0.1},{"dt":1682579160,"precipitation":0},{"dt":1682579220,"precipitation":0},{"dt":1682579280,"precipitation":0},{"dt":1682579340,"precipitation":0},{"dt":1682579400,"precipitation":0},{"dt":1682579460,"precipitation":0},{"dt":1682579520,"precipitation":0},{"dt":1682579580,"precipitation":0},{"dt":1682579640,"precipitation":0},{"dt":1682579700,"precipitation":0},{"dt":1682579760,"precipitation":0},{"dt":1682579820,"precipitation":0},{"dt":1682579880,"precipitation":0},{"dt":1682579940,"precipitation":0},{"dt":1682580000,"precipitation":0},{"dt":1682580060,"precipitation":0},{"dt":1682580120,"precipitation":0},{"dt":1682580180,"precipitation":0},{"dt":1682580240,"precipitation":0},{"dt":1682580300,"precipitation":0},{"dt":1682580360,"precipitation":0},{"dt":1682580420,"precipitation":0},{"dt":1682580480,"precipitation":0},{"dt":1682580540,"precipitation":0},{"dt":1682580600,"precipitation":0},{"dt":1682580660,"precipitation":0},{"dt":1682580720,"precipitation":0},{"dt":1682580780,"precipitation":0},{"dt":1682580840,"precipitation":0},{"dt":1682580900,"precipitation":0}]}
Meinem Verstäntnis nach elements(weather.minutely) = 60 ?