Apple WeatherKit
The built-in Apple WeatherKit driver allows creating a device to retrieve data from Apple's WeatherKit API, including current weather conditions and forecast data. You must have an Apple Developer account to use this driver.
Installation and Configuration
-
Log in to your Apple Developer account, and navigate to Certificates, Identifiers & Profiles.
-
Open the Keys list, select the "+" (plus icon) to create a new key, and provide a key name and optional key description of your choice. (We suggest a name that will remind you that this key is for use with WeatherKit and Hubitat Elevation.) Check the box next to WeatherKit to enable this key for use with WeatherKit, then select Continue and Register.
-
Select Download to download your .p8 key, and make note of the Key ID you see on this page. Select Done when you have both pieces of information.
-
On your hub, navigate to Devices > Add Device, select Virtual, and find Apple WeatherKit from the list of drivers. Select Next, provide a name for you device (as you wish for it to appear on your hub, such as "Apple WeatherKit"), optionally select a room, then select Next (or Skip). Finally, select View device details to open the device detail page for this new device.
-
On the device detail page for your new WeatherKit device, navigate to the Preferences tab, then fill in the following information:
- Service ID: Apple suggests a reverse domain-style string, such as com.example.weatherkit,
- WeatherKit API key ID: The Key ID you saved in step 4.
- WeatherKit API key: The text contents of the .p8 key you downloaded in step 4, the contents between the "-----BEGIN PRIVATE KEY-----" and "-----END PRIVATE KEY-----" lines (do not include these lines themselves or any line breaks).
- Country code: Optional but required for weather alerts
-
Select Save (towards the bottom of the page) and verify that data populates; check Logs for errors if not.
Optionally, you may override preferences such as location (latitude/longitude) or time zone. By default, the driver will use your hub's location and time zone settings for this data.