Add documentation for Apple WeatherKit integration (#28833)

This commit is contained in:
TJ Horner 2023-09-11 10:07:17 -07:00 committed by GitHub
parent 80fab3504d
commit d2e766985e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,52 @@
---
title: Apple WeatherKit
description: Instructions on how to set up Apple WeatherKit with Home Assistant.
ha_category:
- Weather
ha_release: "2023.10"
ha_iot_class: "Cloud Polling"
ha_config_flow: true
ha_codeowners:
- '@tjhorner'
ha_domain: weatherkit
ha_integration_type: integration
ha_platforms:
- weather
---
The Apple WeatherKit integration obtains current weather and forecasts (hourly and daily) from Apple Weather. It is the most direct replacement for those coming from the Dark Sky API since Apple bought Dark Sky and implemented its technology into their weather service.
There is currently support for the following device types within Home Assistant:
- Weather
## Requirements
You will need a [paid Apple Developer Program account](https://developer.apple.com/support/compare-memberships/) to use this integration.
{% include integrations/config_flow.md %}
### Credentials
You will need to obtain the appropriate credentials which you will use to connect to Apple WeatherKit. We need to register a few things in your Apple Developer account:
1. Go to [Certificates, Identifiers & Profiles](https://developer.apple.com/account/resources/certificates/list) in your Apple Developer account.
2. In the [Keys](https://developer.apple.com/account/resources/authkeys/list) section, add a new key.
1. Name it whatever you want.
2. Select "WeatherKit" from the list.
3. Download the `.p8` file provided. This is your **Private Key**.
4. Write down the **Key ID**. You will need it later.
3. In the [Identifiers](https://developer.apple.com/account/resources/identifiers/list) section, add a new identifier.
1. Select "Services IDs" from the drop-down in the top-right.
2. Enter whatever you'd like for the description.
3. For the identifier, Apple recommends using a reverse-DNS style name, like `com.example.homeassistant`.
4. Save the identifier you used. This is your **Service ID**.
You can add a new WeatherKit integration entry now that you have all the credentials. Using the details from earlier, it should look something like this:
- **Key ID**: `ABC123DEFG`
- **Service ID**: `com.example.homeassistant`
- **Apple team ID**: `ABC123DEFG`
- This value can be found in the top-right of the Apple Developer website.
- **Private key**: `-----BEGIN PRIVATE KEY----- [...]`
- Open the `.p8` file you downloaded earlier in a text editor and copy the contents into this field.