Tag Archives: Alert

Installing Ukraine Alarm in HA and setting up notifications

Update 2022.5.3 to Home Assistant introduces a new integration called Ukraine Alarm. With its help, you can get information about air alarms or other alarms in Ukraine in real-time.

Ukraine Alarm creates four binary sensors, each responsible for a specific type of alarm, and when the sensor is in the “on” state, a corresponding alarm goes off.

In version 2022.5.4 HA, the integration got an update. Now you do not need to wait for the API key from the developers (who may not give you the key), and you can configure “Ukraine Alarm” by specifying the area you plan to monitor immediately.

Adding Ukraine Alarm integration to Home Assistant

Click the My button or add “Ukraine Alarm” manually by clicking the “+ Add Integration” button and start entering the name. Then click on the name of our integration.

Next, you need to choose the area where you plan to monitor the alarm, which could be an area, district, local community, or city.

In the last step, you can assign a room (zone) to which new integration sensors would add.

After clicking on the “Finish” button, the “Ukraine Alarm” integration will be added.

As you can see in the image, each instance of this integration creates four binary_sensor entities responsible for having a type of alarm. These alarms are Air, Artillery, Urban Fights, and Unknown. There is a limit on the number of territories, not to exceed the number of API requests from one IP. You can monitor up to 5.

Adding sensors to the home screen in the Dashboard

If you do not want to receive notifications but want clear information about alarms in a particular region, add sensors to the Lovelace card. Of course, you can design the look to your liking.

The first image shows a card with four-alarm sensors when there are no alarms. The second image shows the state of the sensors when the air alarm goes off.

Adding sensors to the home screen in the Dashboard

I already made a tutorial on setting up a Telegram bot that receives notifications from your smart home. Next, I’ll just add the automation code, which will allow you to send notifications to your telegram bot.

I will also provide the code to allow you to manage notifications in your Home Assistant mobile app. This example will use a voice notification, and you will hear it even when your phone is silent. Well, let’s get acquainted with the code.

In the code above, I left comments on the relevant parts.

That’s all for today. Have a peaceful sky without air alerts!