Despite the emergence of a handful of rivals, Home Assistant remains my primary utility for managing my smart devices and IoT gizmos. After all, it’s compatible with all my smart devices, includes plenty of automation provisions, and lets me create beautiful dashboards for my IoT-heavy living space. Best of all, Home Assistant meshes well with my arsenal of self-hosted services, be it my Frigate surveillance system or even my Proxmox home lab!

Gotify is one such utility that I recently combined with Home Assistant, and it’s great for receiving important notifications from HASS, even though setting it up is a bit of a hassle.

What’s the point of linking Gotify with Home Assistant?

Gotify is the central notification server of my home lab

If you’re an avid user of Home Assistant, you may be aware that HASS includes a companion app that can handle everything from manually controlling your smart devices to receiving notifications – and it’s something I’ve been using to get alerts up until now. Well, that’s not going to change after setting up Gotify, as I plan to use both services simultaneously.

That’s because Gotify is currently the core of my alert server, and I’ve paired it with everything from Uptime Kuma and Watchtower to Proxmox and TrueNAS. While Home Assistant’s companion application is undoubtedly useful for minor alerts, pairing the smart home management platform with my Gotify container lets me receive the most crucial notifications on the same server that connects to the rest of my software suite.

Installing the Gotify integration

HACS can be a bit tricky to install

Although it’s easy to integrate Gotify with Home Assistant, you’ll need to configure HACS beforehand… which can get rather complicated. I’ve been using the Home Assistant Community Store to set up custom integrations ever since I tried to connect my Proxmox home lab with HACS, so I didn’t have to configure it again.

But if you haven’t already set up HACS, you’ll have to use this link to add the repo to your Home Assistant server and install the Get HACS add-on. After starting the add-on for a couple of minutes, it will set up the necessary files and shut down in a couple of minutes, which is your cue to restart Home Assistant.

Then, you’ll have to head to the Devices & services tab and add the HACS integration. However, you’ll need to enter your GitHub account credentials and link it with HACS before you can finally start using the community store.

With the integration set up, you’ll have to add the https://github.com/1RandomDev/homeassistant-gotify URL to HACS by clicking on the Menu icon and entering the link inside the Custom Repository section. The Gotify integration will soon pop up inside HACS, and you can press the Download button to add it to your Home Assistant server before restarting the system once again.

Pairing Gotify with Home Assistant

All you need are a few lines of code

Unlike typical integrations and add-ons, which you can set up from their respective pages, you’ll have to add some code to the configuration.yaml file in Home Assistant to connect it to Gotify. Assuming you already have a Gotify instance up and running like I do, you’ll want to create a new application for Home Assistant inside the notification server and copy the token automatically generated by it.

Then, you can head back to Gotify, grab the File Editor or VS Code add-ons (from the Add-on Store inside the Settings tab), and navigate to the configuration.yaml file. Inside, you’ll have to paste the following code:

notify:
- name: "my gotify"
platform: gotify
url:

Be sure to replace the variable with the IP address of your Gotify server and with the Home Assistant application token generated earlier. Also, you’ll want to follow the YAML indentation rules (like I’ve done in the screenshot). Otherwise, the configuration file will throw errors. I recommend using the Check Configuration option in the Developer tools, and if it doesn’t show any errors, you’re clear to reload the file.

The real fun begins once you set up automated alerts.

Once Home Assistant reloads the configuration file, your Gotify server should get paired with HASS. To verify that, you can head to the Actions tab inside Developer tools, select the notify.my_gotify variable, and try sending a custom message. If you’ve followed all the steps properly, Gotify will immediately display the Push notification.

So far, we’ve only connected Gotify with HASS, but Home Assistant’s built-in automations are the centerpiece of this project. That’s because the Automations tab lets you define simple trigger-action chains for all the entities and devices in your smart home. For instance, I’ve paired my Home Assistant server with the smart switch I use with my NAS, so I can get notified if someone accidentally turns it off (and then chew them out for it later).