{"id":40993776,"url":"https://github.com/vannut/statamic-weather-addon","last_synced_at":"2026-01-22T08:06:37.488Z","repository":{"id":45452194,"uuid":"341484353","full_name":"vannut/statamic-weather-addon","owner":"vannut","description":"🎏 A Statamic-Addon for the OpenWeathermap API","archived":false,"fork":false,"pushed_at":"2025-03-30T21:57:07.000Z","size":43,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T22:28:36.825Z","etag":null,"topics":["openweathermap","openweathermap-api","statamic","statamic-addon","statamic-v3"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vannut.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-23T08:36:00.000Z","updated_at":"2025-01-07T08:49:35.000Z","dependencies_parsed_at":"2025-03-19T11:23:15.023Z","dependency_job_id":"91eaf2db-0217-4698-a0ad-375b92fb4464","html_url":"https://github.com/vannut/statamic-weather-addon","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/vannut/statamic-weather-addon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vannut%2Fstatamic-weather-addon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vannut%2Fstatamic-weather-addon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vannut%2Fstatamic-weather-addon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vannut%2Fstatamic-weather-addon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vannut","download_url":"https://codeload.github.com/vannut/statamic-weather-addon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vannut%2Fstatamic-weather-addon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28659039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["openweathermap","openweathermap-api","statamic","statamic-addon","statamic-v3"],"created_at":"2026-01-22T08:05:51.804Z","updated_at":"2026-01-22T08:06:37.475Z","avatar_url":"https://github.com/vannut.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Weather Forecast\n\nDisplay the current weather or a 7-day forecast for any lat/lon on earth.\n\n\u003e Attention: This version (2) is a complete rewrite of the addon. Although it does the same: display a weather forecast; the used weatherprovider is different and some of the fields are renamed. So please pay attention when upgrading.\n\n## Visual Crossing\nThe weather data itself is coming from the Visual Crossing api. [It's free for the first 1,000 records a day.](https://www.visualcrossing.com/weather-data-editions)\n\n## Installation\n1. Install add on through composer: `composer require vannut/statamic-weather-addon \"^2.0\"`\n2. [Create an account](https://www.visualcrossing.com/sign-up) at Visual Crossing.\n3.  After signing in go to your account, you'll find a `Key`\n4.  Go to your Statamic Control Panel and look for the Weather entry in the sidebar.\n5. Fill out the settings-form with your api-key and create a location to fetch the forecast for.\n6. Hit the fetch forecast button.\n6. Or Go to the Command line and perform the first initial fetch of your specific data: `php artisan weather:fetchForecast`\n\n\n## Renewing the forecast\nNothing is as changeable as the weather. Therefore this addon adds [a hourly call](https://github.com/vannut/statamic-weather-addon/blob/master/src/ServiceProvider.php#L25) to the scheduler of Statamic/Laravel.\nAll you have to do is make sure the scheduler is run, by means of a cron-job. Take a look at [Laravels documentation](https://laravel.com/docs/10.x/scheduling#running-the-scheduler) on this!\n\n## Usage\nThis addon does not provide any styling, it _just_ caches the json response and passes the raw data through to the two tags.\n\nYou can find every field in the api-response on [the api-docs of Visual Crossing](https://www.visualcrossing.com/resources/documentation/weather-api/timeline-weather-api/).\n\nNext to the data provided by the API, the addon adds a couple of nice additional fields:\n```\n{{ icon_fa }}           A fontawesome icon derived fron weather.0.icon\n{{ wind_compass }}   Converted wind direction to N/S/SSW etc\n{{ wind_bft }}       Wind speed in Beaufort\n{{ uvi_color }}      Color representation of  the UV Index\n{{ uvi_percentage }} Percentage where UVI 10 = 100%;\n{{ fetched_at }}     Unix Epoch timestamp of the datetime when fetched from API\n```\n\nYou'll have two tags to your disposal: `{{ forecast }}` and `{{ current_weather }}`\n\n## Simple 7 day forecast\nWith the `{{ forecast }}` tag you will be able to display a card per day with the forecast.\nIt's a loop of different days in the forecast. Typically 7 or 15 days depending on the location.\n\nMake sure you specify from which location you want the forecast: \n```html\n\u003cdiv class=\"flex bg-neutral-100\"\u003e\n    {{ forecast :locale=\"site\" location-identifier=\"xyz123\" }}\n        \u003cdiv class=\"rounded-xl bg-white\"\u003e\n            \u003cdiv class=\"lining-nums p-4 text-center\"\u003e\n                {{ datetimeEpoch | iso_format(\"dddd\") }}\u003cbr\u003e\n                {{ datetimeEpoch | iso_format(\"D MMM Y\") }}\u003cbr\u003e\n            \u003c/div\u003e\n            \u003cdiv class=\"pb-4 text-5xl flex justify-center\"\u003e\n                \u003ci class=\"fal {{ icon_fa }}\"\u003e\u003c/i\u003e\n            \u003c/div\u003e\n            \u003cdiv class=\"pb-2 flex items-center justify-center\"\u003e\n                \u003cdiv\u003e\n                    {{ tempmax | round }}\u003cspan class=\"text-neutral-700\"\u003e\u0026deg;C\u003c/span\u003e\n                \u003c/div\u003e\n                \u003cdiv class=\"text-sm\"\u003e\n                    \u003cspan class=\"text-neutral-700\"\u003e\u0026nbsp;\u0026nbsp; / \u003c/span\u003e\n                    {{ tempmin | round }}\u003cspan class=\"text-neutral-700\"\u003e\u0026deg;C\u003c/span\u003e\n                \u003c/div\u003e\n            \u003c/div\u003e\n            \u003cdiv class=\"flex items-center justify-center pb-4\"\u003e\n                \u003cdiv\u003e\n                    \u003ci class=\"fal fa-wind\"\u003e\u003c/i\u003e\n                    {{ wind_compass }} {{ wind_bft  }}\u003cspan class=\"text-neutral-700\"\u003eBft\u003c/span\u003e\n                \u003c/div\u003e\n            \u003c/div\u003e\n        \u003c/div\u003e\n    {{/forecast }}\n\u003c/div\u003e\n```\n\n## Current weather\nWant to display the current weather of your location? Use the `{{ current_weather }}` tag. As this is a json-collection you can get its data as following:\n\n```html\n    {{ current_weather :locale=\"site\" location-identifier=\"xyz123\" }}\n        \u003cdiv class=\"bg-neutral-200 rounded-xl p-4 m-4\"\u003e\n            \u003cdiv class=\"pb-4 text-5xl flex justify-center\"\u003e\n                \u003ci class=\"fal {{ icon }}\"\u003e\u003c/i\u003e\n            \u003c/div\u003e\n            \u003cdiv\u003e\n                Current temperature: {{  temp }}\u003cspan class=\"text-neutral-700\"\u003e\u0026deg;C\u003c/span\u003e\n            \u003c/div\u003e\n            \u003cdiv\u003e\n                Feels like: {{ feels_like }}\u003cspan class=\"text-neutral-700\"\u003e\u0026deg;C\u003c/span\u003e\n            \u003c/div\u003e\n        \u003c/div\u003e\n    {{ /current_weather }}\n```\n\n---\n\u003cp\u003e\n\u003ca href=\"https://statamic.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/Statamic-5.0+-FF269E?style=for-the-badge\" alt=\"Compatible with Statamic v5\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/vannut/statamic-weather-addon/stats\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/vannut/statamic-weather-addon?style=for-the-badge\" alt=\"Addon on Packagist\"\u003e\u003c/a\u003e\n\u003c/p\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvannut%2Fstatamic-weather-addon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvannut%2Fstatamic-weather-addon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvannut%2Fstatamic-weather-addon/lists"}