Last active
July 8, 2023 16:23
-
-
Save jeffehobbs/29659661dfcf76c42b2c606b945d2000 to your computer and use it in GitHub Desktop.
YAML configuration for WeatherKit data into Home Assistant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration for WeatherKit in Home Assistant: customize lat/long/token | |
rest: | |
- resource: https://weatherkit.apple.com/api/v1/weather/en/YOUR_LATITUDE/YOUR_LONGITUDE | |
headers: | |
Authorization: 'Bearer YOUR_TOKEN_HERE' | |
params: | |
countryCode: 'US' | |
dataSets: 'currentWeather,forecastDaily,forecastNextHour,forecastHourly,weatherAlerts' | |
timezone: 'GMT-5' | |
scan_interval: 60 | |
sensor: | |
- name: "WeatherKit currentWeather" | |
json_attributes_path: "$.currentWeather" | |
value_template: "OK" | |
json_attributes: | |
- "asOf" | |
- "cloudCover" | |
- "conditionCode" | |
- "daylight" | |
- "humidity" | |
- "name" | |
- "precipitationIntensity" | |
- "pressure" | |
- "pressureTrend" | |
- "temperature" | |
- "temperatureApparent" | |
- "temperatureDewPoint" | |
- "uvIndex" | |
- "visibility" | |
- "windDirection" | |
- "windGust" | |
- "windSpeed" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Get your own WeatherKit API token by following the instructions here:
https://gist.github.com/jeffehobbs/1d35ac0d49b59ce75bc74f033188a6f1