briis / visualcrossing

Home Assistant integration retrieving Weather Data from the Visual Crossing API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Visual Crossing Weather integration for Home Assistant

GitHub Release GitHub Activity License hacs Project Maintenance Community Forum

The Visual Crossing integration adds support for retrieving Current Weather data and Daily/Hourly Weather data from the company Visual Crossing

You must have an account with Visual Crossing to use this API, but they have a Free Plan you can sign up for that allows up to 1000 daily calls to the API. That is more than sufficient for this integration, that by default will update every 30-35 minutes. You can even have more than one instance installed without hitting the limit.

This integration will set up the following platforms.

Platform Description
weather A Home Assistant weather entity, with current data, daily- and hourly forecast data.

Minimum required version of Home Assistant is 2023.9.0 as this integration uses the new Weather entity forecast types.

Installation through HACS (Recommended Method)

This Integration is not yet part of the default HACS store, but can still be installed through HACS.

  • Open HACS, click integrations, and then in the upper right corner click on the three dots.
  • Select Custom Repositories and in the bottom add https://github.com/briis/visualcrossing to the Repository field and under Category select Integration.
  • Close the dialog box, and you should now see the Visual Crossing integration show up in HACS as a new integration.
  • Click on it and select the DOWNLOAD button in the lower right corner.

After the installation of the files, you must restart Home Assistant, or else you will not be able to add Visual Crossing from the Integration Page.

If you are not familiar with HACS, or haven't installed it, I would recommend to look through the HACS documentation, before continuing. Even though you can install the Integration manually, I would recommend using HACS, as you would always be reminded when a new release is published.

Manual Installation

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called visualcrossing.
  4. Download all the files from the custom_components/visualcrossing/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "visualcrossing"

Configuration

To add Visual Crossing Weather to your installation, do the following:

  • Go to Configuration and Integrations

  • Click the + ADD INTEGRATION button in the lower right corner.

  • Search for Visual Crossing* and click the integration.

  • When loaded, there will be a configuration box, where you must enter:

    Parameter Required Default Value Description
    Location Name Yes Home A name to identify this instance of Visual Crossing
    API Key Yes None A Key you get by creating a Free Plan with Visual Crossing
    Latitude Yes HA Latitude The latitude of the location you want data for
    Longitude Yes HA Longitude The longitude of the location you want data for
  • Click on SUBMIT to save your data. If all goes well you should now have a new Weather entity with data from Visual Crossing

    Visual Crossing will get data from the official weather station closest to the Latitude and Longitude you are supplying.

You can configure more than 1 instance of the Integration by using a different Latitude and Longitude.

Changing parameters

Once installed you can change some parameters, bly clicking on the CONFIGURE button on the Integration.

Parameter Required Default Value Description
Days No 7 Number of days to retrieve forecast data for. Minimum is 1 and maximum is 14. Data is retrieved for the current day plus this number of days.
Language No HA Language A language code, that is only used to retrieve a long weather description you will find as an attribute on the weather entity.

Contributions are welcome

If you want to contribute to this please read the Contribution guidelines


About

Home Assistant integration retrieving Weather Data from the Visual Crossing API

License:MIT License


Languages

Language:Python 95.3%Language:Shell 4.7%