Giter Club home page Giter Club logo

homeassistant-ntfy.sh's Introduction

ntfy.sh Home Assistant Notifications

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

Installation

The recommended way to install the integration is via HACS. Add this repository to HACS custom integration repositories and install. 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 ntfy"
    platform: ntfy
    url: <ntfy.sh_url>
    token: <ntfy.sh_token>
    topic: <ntfy.sh_topic>
    icon: <notification_icon_url>

Replace <ntfy.sh_url>, <ntfy.sh_token>, <ntfy.sh_topic>, and <notification_icon_url> with the url, optional token, optional topic, and optional icon url for your ntfy.sh instance. Token is optional if your instance does not require authentication. Topic is also optional and will default to homeassistant if not specified. Topics in the automations have higher priority.

Usage

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

Simple text message

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

Message with title and priority

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

Message with click event

action:
  - service: notify.my_ntfy
    data:
      message: "This is a test message."
      title: "ntfy Test"
      data:
        priority: 10
        click: 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
        image: https://placekitten.com/400/300
All available options
action:
  - service: notify.my_gotify
    data:
      message: "This is a test message."
      title: "Gotify Test"
      topic: "override_default_topic"
      data:
        tags: [tags]
        priority: 3
        attach: https://placekitten.com/400/300
        filename: filename.jpg
        click: https://www.home-assistant.io/
        actions: [list_of_actions]
        icon: https://placekitten.com/400/300

License

The whole project is under the GPL-3 license.

homeassistant-ntfy.sh's People

Contributors

ivanmihov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.