How to configure conditions and weather forecast Dark Sky on Home Assistant

3 minutes of reading
Guide purposes
  • Add service-based weather detection and forecast sensors Dark Sky to the configuration of Home Assistant
  • Difficulty level: bass
Concepts dealt with:
  • Software configuration
Software components used:
Prerequisites
Physical devices used:
GUIDE more indicated for:

All environments

Notes and disclaimer
  • qualsiasi modifica all'impianto elettrico dev'essere progettata ed effettuata da personale qualificato;
  • any changes implemented in probefore is a propersonal responsibility as well as a profirst risk and danger (the contents of the present page are purely educational);
  • any changes implemented in proprior to a device it voids the guarantee, quality approvals and certifications.
Driving review: 1.3
guide by Andker

Abstract

Darksky is a free meteorological service which, when integrated at Home Assistant, allows you to equip yourself with entity of type "Sensor"Relating to weather surveys (relating to current conditions - and more, as we shall see) and a" Weather "type, containing the summary forecasts of the profirst zone.

The available sensors are:

– apparent_temperature - apparent_temperature_high - apparent_temperature_low - cloud_cover - daily_summary - dew_point - hourly_summary - humidity - minutely_summary - moon_phase - ozone - precip_accumulation - precip_intensity - precip_intensity_max - precip_probability - precip_type - pressure - summary - temperatures - temperature_high - temperature_low - uv_index - visibility - wind_bearing - wind_speed

Unlike other platforms (for example Weather Underground), DarkSky is free up to a maximum of 1000 daily queries, more than enough for personal home use.

Get the propria API KEY

The first step to configure DarkSky is to get the propria API KEY, or a string of characters that uniquely identifies the user and authorizes the collection of weather information.

Connect to the site https://darksky.net/dev and, once registered, at the propria user area ("Your Account"), Identify (and copy) the propria "Secret Key"

DarkSky API KEY

As you can easily see, the "Plan Type" is of the "Trial" type: this means that for theappanointed is free, gratuitousness that allows a maximum of 1000 automatic queries per day.

DarkSky "weather" mode

The DarkSky platform can be configured on Home Assistant in two ways: such as meteorological service o as a group of sensors (or both modes). In the first case, we give ourselves an ad hoc panel more oriented to simple consultation; in the second, we are given true e profirst sensors that can be consulted but can also be used for home automation (eg "if rain is expected later, disable the automatic sprinkler“).

To configure DarkSky in "weather" mode, the configuration is similar to the following:

weather:
  - platform: darksky
    name:
    api_key:
    scan_interval:
      days: 0
      hours: 0
      minutes: 0
      seconds: 0
      milliseconds: 0

where:

platform(String, mandatory) the name of the platform - necessarily "darksky"
name(String, optional) The name of the "weather" panel
api_key(String, mandatory) The API Key you got from the DarkSky user panel
latitude/longitude(String, optional) Latitude and longitude of the location to be monitored (usually the same configured on configuration.yaml regarding the proposition). Where not indicated, the coordinates of the house indicated in the “will be usedhomeassistant:" of the profirst configuration file of Home Assistant.
update_intervalThe interval between a data census is the following

It is important to configure theupdate interval: the shortest configurable period is 1 minute and 44 seconds, which corresponds to the fateful 1000 maximum queries per day offered free by DarkSky.
The value we recommend is 5 minutes.

DarkSky "sensor" mode

As explained, it is also possible to promptly configure the list of sensors to be introduced in home automation.
The type configuration it's the following:

sensor:
- platform: darksky
  name:
  api_key:
  language: it
  scan_interval:
    days: 0
    hours: 0
    minutes: 0
    seconds: 0
    milliseconds: 0
  monitored_conditions:
    - apparent_temperature
    - apparent_temperature_high
    - apparent_temperature_low
    - cloud_cover
    - daily_summary
    - dew_point
    - hourly_summary
    - humidity
    - minutely_summary
    - moon_phase
    - ozone
    - precip_accumulation
    - precip_intensity
    - precip_intensity_max
    - precip_probability
    - precip_type
    - pressure
    - summary
    - temperature
    - temperature_high
    - temperature_low
    - uv_index
    - visibility
    - wind_bearing
    - wind_speed

The configuration parameters they are the same expressed for the "weather" mode.
Obviously, the choice of which sensors to configure is personal.

Downstream of the configuration (perhaps using a grouping), the output on the frontend looks like the following:

Darksky Sensor Group

guide by Andker


Home Assistant Official LogoATTENZIONE: remember that there is on our FORUM community an ad hoc section dedicated to Home Assistant, for any doubt, question, information on the specific merit of these components.


Please comment below