Yandex.Weather in Home Assistant

After gismeteo became more and more upset by the inaccessibility of data in Home Assistant (and I ended up on the cold floor in the bathroom in the morning because HA could not find out what the weather was like outside and whether he needed to turn on the warm floor), I thought about changing the source of weather information. The choice fell on Yandex.Weather. At the beginning, I wanted to get by with a command_line sensor that would pull the temperature through the API, but I broke down and filed a whole integration, which I would like to share.

A Pull Request to add to HACS is pending (apparently, the new repository is not in demand), so the repository (for now) will have to be added manually as a user one: HACS -> Integrations -> Three dots in the upper right corner -> user repositories. We fill in:

After that, the integration can be installed through HACS, restarted Home Assistant and added to HA in the “Devices and Services” settings section.

Next you need a key. Yandex.Weather API (free, with no time limit, but with a limit on the number of requests per day, called “Weather on your site”), integration takes coordinates from the HA settings.

And a few interesting things, for those who decide to use:

  • Yandex updates weather data (at least for Moscow on a free plan) once an hour, so 50 requests per day, available on a free plan, is enough.

  • Yandex draws its own pictures with the weather status. The link to the image with the current status is available through the integration weather component, in the attribute entity_picture

  • Yandex weather conditions are much richer than those provided for in Home Assistant, therefore they are placed in a separate sensor.

  • Through the API, the forecast is given in the form of a forecast for a part of the day (morning/afternoon/evening/night) and has not yet been added to the integration (but will be in future releases).

  • When the weather state changes, the integration throws an event that can be used in automations.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *