From 3939599014dc7f03f7350f6d383a44fc1fdfa384 Mon Sep 17 00:00:00 2001 From: Pat O'Brien <3484775+poblabs@users.noreply.github.com> Date: Sun, 29 May 2022 16:11:54 -0400 Subject: [PATCH 1/2] Add initial home assistant configuration examples --- docs/examples.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/docs/examples.md b/docs/examples.md index abffc662..c3d1eeab 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -385,3 +385,51 @@ JSON payload. Remember to change the `https://requests.example.com` to your jell "click": "https://requests.example.com/{{media_type}}/{{media_tmdbid}}" } ``` + +## Home Assistant +Here is an example for the configuration.yml file to setup a REST notify component. +Since Home Assistant is going to POST JSON, you need to specify the root of your ntfy resource. + +```yaml +notify: + - name: ntfy + platform: rest + method: POST_JSON + data: + topic: YOUR_NTFY_TOPIC + title_param_name: title + message_param_name: message + resource: https://ntfy.sh +``` + +If you need to authenticate to your ntfy resource, try this template below: + +```yaml +notify: + - name: ntfy + platform: rest + method: POST_JSON + authentication: basic + username: YOUR_USERNAME + password: YOUR_PASSWORD + data: + topic: YOUR_NTFY_TOPIC + title_param_name: title + message_param_name: message + resource: https://ntfy.sh +``` + +If you need to add any other [ntfy specific parameters](https://ntfy.sh/docs/publish/#publish-as-json) such as priority, tags, etc., add them to the `data` array in the example yml. For example: + +```yaml +notify: + - name: ntfy + platform: rest + method: POST_JSON + data: + topic: YOUR_NTFY_TOPIC + priority: 4 + title_param_name: title + message_param_name: message + resource: https://ntfy.sh +``` From 7e3ac9b76b282b1eaae417cb463d0f039b31f7cf Mon Sep 17 00:00:00 2001 From: Pat O'Brien <3484775+poblabs@users.noreply.github.com> Date: Sun, 29 May 2022 16:12:58 -0400 Subject: [PATCH 2/2] Update home assistant example --- docs/examples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples.md b/docs/examples.md index c3d1eeab..8c94daf6 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -402,7 +402,7 @@ notify: resource: https://ntfy.sh ``` -If you need to authenticate to your ntfy resource, try this template below: +If you need to authenticate to your ntfy resource, define the authentication, username and password as below: ```yaml notify: