Adding Pirate Weather as a data source in Home Assistant

Pirate Weather is a free weather data service that works as a drop-in replacement for Dark Sky, which Home Assistant no longer supports. You add it by installing the Pirate Weather integration, entering your location coordinates and API key, and letting Home Assistant pull weather updates into your automations and dashboards. The whole process takes about ten minutes and requires no coding.

Pirate Weather pulls data from the National Weather Service and other public sources, then formats it the way Home Assistant expects. Because it mimics Dark Sky's structure, if you previously used Dark Sky in Home Assistant, switching to Pirate Weather means your existing automations and templates will work without changes.

Key Takeaways

  • You need a free Pirate Weather API key from pirateweather.net before you start, which takes less than a minute to generate.
  • Home Assistant's Pirate Weather integration installs through Settings > Devices & Services > Create Automation, not through HACS or manual file editing.
  • You must provide your latitude and longitude coordinates, which you can find by searching your address on Google Maps or OpenStreetMap.
  • After setup, weather data appears as a sensor entity you can use in automations, templates, and dashboard cards without additional configuration.

Getting your Pirate Weather API key

Visit pirateweather.net and click the sign-up link at the top of the page. Enter an email address and password, then check your inbox for a confirmation link. Once you confirm, log in and look for the API key section — it's usually on your account dashboard or under a "Keys" tab. Copy the key and save it somewhere you can find it; you'll paste it into Home Assistant in the next step.

The free tier includes up to 500 API calls per day, which is more than enough for a typical Home Assistant setup that checks weather every 10 to 15 minutes. If you run multiple instances or check more frequently, you may hit the limit, but most home setups never do.

Finding your location coordinates

Open Google Maps in a browser and search for your address. Right-click on the pin that marks your location and select the coordinates at the top of the menu — they'll look like "40.7128, -74.0060". Copy both numbers. Alternatively, go to openstreetmap.org, search for your address, and click the location; the URL will contain your coordinates in the format ?lat=40.7128&lon=-74.0060.

Home Assistant needs these coordinates to know where to fetch weather for. If you want weather for a different location than where Home Assistant runs, use the coordinates of that location instead.

Installing the Pirate Weather integration in Home Assistant

Open Home Assistant and go to Settings in the left sidebar. Click Devices & Services, then the Create Automation button in the bottom right (or look for an "Integrations" tab if your version shows it separately). Search for "Pirate Weather" in the list of available integrations.

Click on Pirate Weather and select Create Integration. A form will appear asking for three things: your API key (paste the one you copied from pirateweather.net), your latitude, and your longitude. Enter all three and click Submit. Home Assistant will test the connection; if the coordinates and key are correct, the integration will load.

If you see an error, double-check that you copied the API key without extra spaces and that your coordinates are in decimal format (like 40.7128, not 40°42'46"). Most errors come from typos in one of these fields.

What entities Pirate Weather creates

Once the integration loads, Home Assistant creates a weather entity named something like weather.pirate_weather_home. This entity holds current conditions, temperature, humidity, wind speed, and forecast data. You can see it in Settings > Devices & Services > Pirate Weather, where it lists all the sensors and attributes the integration provides.

You can also see the raw data by going to Developer Tools > States and searching for "weather.pirate_weather". The state shows the current condition (like "rainy" or "sunny"), and the attributes section below shows temperature, humidity, wind direction, and the next few days' forecast as a list.

Using Pirate Weather in automations and dashboards

In any automation, you can now trigger on weather conditions. For example, you could create an automation that turns on outdoor lights when it gets dark and the forecast shows rain, or one that sends a notification if tomorrow's high is below freezing. In the automation editor, use the weather entity (weather.pirate_weather_home or whatever yours is named) and pick the condition you want to watch.

On your dashboard, add a weather card by clicking the three dots on any dashboard, selecting Edit Dashboard, then clicking Create New Card. Choose Weather Card from the list, select your Pirate Weather entity, and save. The card will display the current conditions, temperature, and a multi-day forecast.

If you write templates in Home Assistant, you can reference weather data like this: {{ state_attr('weather.pirate_weather_home', 'temperature') }} to get the current temperature, or {{ states('weather.pirate_weather_home') }} to get the current condition as text.

Troubleshooting common setup problems

If the integration fails to load, the most common cause is an incorrect API key or coordinates. Log back into pirateweather.net and confirm your key is exactly as shown on your account page. For coordinates, use an online tool like latlong.net to verify you have the right numbers for your address.

If the integration loads but shows no data, wait a few minutes — the first weather fetch can take longer than usual. Then go to Settings > Devices & Services, find Pirate Weather, and click the three dots next to it to reload the integration. If data still doesn't appear, check Home Assistant's logs (Settings > System > Logs) for error messages that mention Pirate Weather; they usually point to what went wrong.

If you move to a new location and want to update your weather coordinates, go to Settings > Devices & Services > Pirate Weather, click the three dots, select Reconfigure, and enter your new latitude and longitude. You don't need to delete and reinstall the integration.

Frequently Asked Questions

Can I use Pirate Weather if I don't have internet access to Home Assistant?

No. Pirate Weather is a cloud service, so Home Assistant must reach pirateweather.net to fetch weather data. If your Home Assistant instance is offline or can't reach the internet, the weather integration won't work. You would need a local weather station connected to Home Assistant instead.

How often does Pirate Weather update the weather data?

Home Assistant checks for new data every 10 minutes by default. You can change this interval in the integration settings, but checking more frequently than every 5 minutes will use your API quota faster and may hit the free tier limit if you run multiple instances.

What happens if I exceed the 500 daily API calls on the free tier?

Pirate Weather will stop returning data for the rest of that day. Your automations and dashboard will show the last known weather state, but it won't update. The quota resets at midnight. If you consistently hit the limit, you can upgrade to a paid tier on pirateweather.net for higher limits.

Can I use Pirate Weather for multiple locations in one Home Assistant instance?

Yes. Go back to Settings > Devices & Services and create a second Pirate Weather integration with different coordinates. Each one will create its own weather entity (like weather.pirate_weather_home and weather.pirate_weather_cabin), and you can use both in automations and on your dashboard.

Do I need to update anything if Pirate Weather changes its service?

Home Assistant handles updates to the Pirate Weather integration automatically when you update Home Assistant itself. You won't need to change your API key, coordinates, or automations unless Pirate Weather shuts down entirely, which would be announced on their website well in advance.