Dark Sky
The darksky
platform uses the Dark Sky web service as a source for meteorological data for your location. The location is based on the longitude
and latitude
coordinates configured in your configuration.yaml
file. The coordinates are auto-detected but to take advantage of the hyper-local weather reported by Dark Sky, you can refine them down to your exact home address. GPS coordinates can be found by using Google Maps and clicking on your home or Openstreetmap.
Setup
On March 31, 2020 Dark Sky was acquired by Apple and is no longer allowing new API registrations. The Dark Sky API will continue to function for existing users until March 31st, 2023, but it is no longer possible to obtain an API key for new users. Home Assistant supports many alternative weather integrations.
You can make up to 1000 calls per day for free which means that you could make one approximately every 86 seconds.
Dark Sky will charge you $0.0001 per API call if you enter your credit card details and create more than 1000 calls per day.
Configuration
To add Dark Sky to your installation, add the following to your configuration.yaml
file:
# Example configuration.yaml entry
sensor:
- platform: darksky
api_key: YOUR_API_KEY
forecast:
- 0
hourly_forecast:
- 0
- 1
monitored_conditions:
- summary
- icon
- temperature
Configuration Variables
List of days in the 7-day forecast you would like to receive data on, starting with today as day 0 and ending with day 7. Any condition from monitored_conditions
with a daily forecast by Dark Sky will generate a sensor with entity_id <condition>_<day>d
.
List of hours in the 48-hour forecast you would like to receive data on, starting with this hour as hour 0 and ending with hour 48. Any condition from monitored_conditions
with an hourly forecast by Dark Sky will generate a sensor with entity_id <condition>_<hour>h
.
The desired language of the summary properties. The valid options are further down in a table.
Latitude coordinate to monitor weather of (required if longitude is specified).
coordinates from the Home Assistant configuration
Longitude coordinate to monitor weather of (required if latitude is specified).
coordinates from the Home Assistant configuration
Conditions to display in the frontend.
A machine-readable text summary, suitable for selecting an icon for display. See Dark Sky API documentation for the list of possible values.
The type of precipitation occurring at the given time. If precip_intensity
is zero, then this property will be unknown
. See Dark Sky API documentation for the list of possible values.
The intensity of precipitation occurring at the given time. This value is conditional on probability (that is, assuming any precipitation occurs at all).
The amount of snowfall accumulation expected to occur. If no snowfall is expected, this property will be undefined
.
The direction that the wind is coming from in degrees, with true north at 0° and progressing clockwise. If wind_speed
is 0, then this value is unknown
.
The fractional part of the lunation number during the given day: a value of 0 corresponds to a new moon, 0.25 to a first quarter moon, 0.5 to a full moon, and 0.75 to a last quarter moon.
The approximate direction of the nearest storm in degrees, with true north at 0° and progressing clockwise.
Specify the unit system. Valid options are auto
, us
, si
, ca
and uk2
. auto
will let Dark Sky decide the unit system based on location.
si
or us
, based on the temperature preference in Home Assistant.
Please note that some monitored conditions, such as temperature_high
or temperature_low
, may only work when setting the forecast
attribute to at least 0
(current day).
Time period dictionary example
scan_interval:
# At least one of these must be specified:
days: 0
hours: 0
minutes: 3
seconds: 30
milliseconds: 0
Language options
All language options are described in this table that you can use for the Dark Sky sensor.
Language | Variable Code |
---|---|
Arabic | ar |
Azerbaijani | az |
Belarusian | be |
Bulgarian | bg |
Bengali | bn |
Bosnian | bs |
Catalan | ca |
Czech | cs |
Danish | da |
German | de |
Greek | el |
English | en |
Esperanto | eo |
Spanish | es |
Estonian | et |
Finnish | fi |
French | fr |
Hebrew | he |
Hindi | hi |
Croatian | hr |
Hungarian | hu |
Indonesian | id |
Icelandic | is |
Italian | it |
Japanese | ja |
Georgian | ka |
Kannada | kn |
Korean | ko |
Cornish | kw |
Latvian | lv |
Malayam | ml |
Marathi | mr |
Norwegian Bokmål | nb |
Dutch | nl |
Punjabi | pa |
Polish | pl |
Portuguese | pt |
Romanian | ro |
Russian | ru |
Slovak | sk |
Slovenian | sl |
Serbian | sr |
Swedish | sv |
Tamil | ta |
Telugu | te |
Tetum | tet |
Turkish | tr |
Ukrainian | uk |
Urdu | ur |
Igpay Atinlay | x-pig-latin |
simplified Chinese | zh |
traditional Chinese | zh-tw |
More details about the API are available in the Dark Sky API documentation.