sunshine_hours
Retrieve total sunshine hours for a Swiss location or postal code over a specific period. Provide start and end times to receive summed sunshine in hours.
Instructions
Get the sunshine hours for a location over a period.
MeteoSwiss publishes sunshine as minutes per hour, which are added up over the period
and reported as hours.
Args:
location (str): Location name (e.g., "Zurich") or Swiss postal code (e.g., "8001").
start (str): Swiss local time the period starts, 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, ISO 8601 without offset, e.g. "2026-09-23T18:00".
Returns:
dict: Sunshine in hours, the resolved location with its altitude, the period, and
the model run.
Examples:
sunshine_hours("Zurich", "2026-09-23T00:00", "2026-09-24T00:00") # the whole day
sunshine_hours("Zurich", "2026-09-23T12:00", "2026-09-23T18:00") # the afternoon
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | ||
| start | Yes | ||
| location | Yes |