forecast_sunshine
Get the sunshine hours for a place over a period.
Instructions
Get the sunshine hours for a place over a period.
MeteoSwiss publishes sunshine as minutes per hour, which are added up over the period
and reported as hours.
Args:
location (str): Place name: a town, village, city district, lake or peak (e.g., "Zurich").
start (str): Swiss local time the period starts, as a full hour in ISO 8601 without offset, e.g. "2026-09-23T06:00". Today or up to 8 days ahead.
end (str): Swiss local time the period ends, as a full hour in ISO 8601 without offset, e.g. "2026-09-23T18:00".
Returns:
dict: The sunshine in hours, the place, the forecast point used, the period and the
model run.
Examples:
forecast_sunshine("Zurich", "2026-09-23T00:00", "2026-09-24T00:00") # the whole day
forecast_sunshine("Zurich", "2026-09-23T12:00", "2026-09-23T18:00") # the afternoon
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | ||
| near | No | Only when several places share the name: a village next to the place the user means. For "the Blausee near Bettmeralp" use location "Blausee" and near "Bettmeralp". Leave it out otherwise. | |
| start | Yes | ||
| location | Yes |