1RandomDev / homeassistant-gotify

HomeAssistant notification platform for Gotify.
GNU General Public License v3.0
13 stars 1 forks source link
gotify hacs homeassistant integration notifications

Gotify Notifications

The gotify notification platform enables you to easily send notifications with a custom prioirty and extra information via Gotify.

Installation

The recommendet way to install the integration is via HACS. You can find it by searching for Gotify Notifications. If you want to install it manually download the repository as zip and extract it to the <config_dir>/custom_components/ directory of HomeAssistant.

Configuration

This integration exposes itself as a notifications integration and configured by adding the folowing snippet to the configuration.yaml file:

notify:
  - name: "my gotify"
    platform: gotify
    url: <gotify_url>
    token: <gotify_token>

Replace <gotify_url> and <gotify_token> with the url of your Gotify instance and the application token to be used.

Usage

This integration accepts the same values as the official Gotify API. For a full list of extras that can be added to a notification refer to the Gotify docs. Here a few examples:

Simple text message

action:
  - service: notify.my_gotify
    data:
      message: "This is a test message."

Message with title and priority

action:
  - service: notify.my_gotify
    data:
      message: "This is a test message."
      title: "Gotify Test"
      data:
        priority: 10

Message with click event

action:
  - service: notify.my_gotify
    data:
      message: "This is a test message."
      title: "Gotify Test"
      data:
        priority: 10
        extras:
          'client::notification':
            click:
              url: https://www.home-assistant.io/
Message with image
action:
  - service: notify.my_gotify
    data:
      message: "This is a test message."
      title: "Gotify Test"
      data:
        priority: 10
        extras:
          'client::notification':
            bigImageUrl: https://placekitten.com/400/300

License

The whole project is under the GPL-3 license.