Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for ntfy integration #36833

Open
wants to merge 4 commits into
base: next
Choose a base branch
from

Conversation

tr4nt0r
Copy link
Contributor

@tr4nt0r tr4nt0r commented Jan 9, 2025

Proposed change

Adds documentation for the ntfy integration

Type of change

  • Spelling, grammar or other readability improvements (current branch).
  • Adjusted missing or incorrect information in the current documentation (current branch).
  • Added documentation for a new integration I'm adding to Home Assistant (next branch).
  • Added documentation for a new feature I'm adding to Home Assistant (next branch).
  • Removed stale or deprecated documentation.

Additional information

Checklist

  • This PR uses the correct branch, based on one of the following:
    • I made a change to the existing documentation and used the current branch.
    • I made a change that is related to an upcoming version of Home Assistant and used the next branch.
  • The documentation follows the Home Assistant documentation standards.

Summary by CodeRabbit

  • New Features
    • Added ntfy integration for sending push notifications in Home Assistant.
    • Supports cloud push notifications with configurable service URL and topic.
    • Enables sending messages through notify.send_message action.
    • Comprehensive setup and usage instructions provided in the documentation.
    • Clear instructions for removing the integration included.

@home-assistant home-assistant bot added has-parent This PR has a parent PR in a other repo next This PR goes into the next branch labels Jan 9, 2025
Copy link

netlify bot commented Jan 9, 2025

Deploy Preview for home-assistant-docs ready!

Name Link
🔨 Latest commit d652037
🔍 Latest deploy log https://app.netlify.com/sites/home-assistant-docs/deploys/67802b8ce97a5b000881d1f5
😎 Deploy Preview https://deploy-preview-36833--home-assistant-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

coderabbitai bot commented Jan 9, 2025

📝 Walkthrough

Walkthrough

The pull request introduces a new Home Assistant integration for ntfy, an HTTP-based pub-sub notification service. The documentation provides comprehensive setup instructions for users to configure push notifications using ntfy. It covers the integration's purpose, prerequisites, configuration parameters, and usage guidelines, enabling users to send notifications to mobile devices and desktops through a dedicated notify entity.

Changes

File Change Summary
source/_integrations/ntfy.markdown Added new integration documentation for ntfy, including service description, configuration details, setup instructions, and example YAML configuration

Sequence Diagram

sequenceDiagram
    participant User
    participant HomeAssistant
    participant NtfyService
    participant MobileDevice

    User->>HomeAssistant: Configure ntfy integration
    HomeAssistant->>NtfyService: Register topic
    NtfyService-->>HomeAssistant: Confirmation
    User->>HomeAssistant: Send notification
    HomeAssistant->>NtfyService: Publish message
    NtfyService->>MobileDevice: Push notification
Loading

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
source/_integrations/ntfy.markdown (2)

30-41: Clean up trailing spaces

There are trailing spaces at the end of several lines in this section. While this doesn't affect the rendered output, it's good practice to remove them for consistency.

🧰 Tools
🪛 Markdownlint (0.37.0)

30-30: Expected: 0 or 2; Actual: 4
Trailing spaces

(MD009, no-trailing-spaces)


31-31: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


32-32: Expected: 0 or 2; Actual: 4
Trailing spaces

(MD009, no-trailing-spaces)


34-34: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


38-38: Expected: 0 or 2; Actual: 4
Trailing spaces

(MD009, no-trailing-spaces)


56-56: Add missing comma for better readability

Add a comma after "notifications" for better sentence structure.

-To publish notifications you can use the `notify.send_message` action.
+To publish notifications, you can use the `notify.send_message` action.
🧰 Tools
🪛 LanguageTool

[typographical] ~56-~56: It seems that a comma is missing.
Context: ... with the name of the topic. To publish notifications you can use the notify.send_message a...

(IN_ORDER_TO_VB_COMMA)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8864a17 and f13cc4d.

📒 Files selected for processing (1)
  • source/_integrations/ntfy.markdown (1 hunks)
🧰 Additional context used
🪛 LanguageTool
source/_integrations/ntfy.markdown

[typographical] ~56-~56: It seems that a comma is missing.
Context: ... with the name of the topic. To publish notifications you can use the notify.send_message a...

(IN_ORDER_TO_VB_COMMA)

🪛 Markdownlint (0.37.0)
source/_integrations/ntfy.markdown

30-30: Expected: 0 or 2; Actual: 4
Trailing spaces

(MD009, no-trailing-spaces)


31-31: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


32-32: Expected: 0 or 2; Actual: 4
Trailing spaces

(MD009, no-trailing-spaces)


34-34: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


38-38: Expected: 0 or 2; Actual: 4
Trailing spaces

(MD009, no-trailing-spaces)


58-58: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


68-68: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


77-77: null
Files should end with a single newline character

(MD047, single-trailing-newline)

🔇 Additional comments (3)
source/_integrations/ntfy.markdown (3)

7-7: Verify the release version

The release version is set to 2025.2 which is in the future. Please ensure this aligns with the planned release schedule or adjust it to the correct version.


63-69: LGTM! Well-structured example configuration.

The YAML example is clear, concise, and demonstrates the basic usage effectively.

🧰 Tools
🪛 Markdownlint (0.37.0)

68-68: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


1-77: Overall excellent documentation structure and content

The documentation is comprehensive and well-organized, covering all essential aspects of the ntfy integration:

  • Clear prerequisites and setup instructions
  • Well-documented configuration parameters
  • Practical usage examples
  • Complete removal instructions

Just a few minor formatting and typographical issues to address, but otherwise ready to merge.

🧰 Tools
🪛 LanguageTool

[typographical] ~56-~56: It seems that a comma is missing.
Context: ... with the name of the topic. To publish notifications you can use the notify.send_message a...

(IN_ORDER_TO_VB_COMMA)

🪛 Markdownlint (0.37.0)

30-30: Expected: 0 or 2; Actual: 4
Trailing spaces

(MD009, no-trailing-spaces)


31-31: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


32-32: Expected: 0 or 2; Actual: 4
Trailing spaces

(MD009, no-trailing-spaces)


34-34: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


38-38: Expected: 0 or 2; Actual: 4
Trailing spaces

(MD009, no-trailing-spaces)


58-58: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


68-68: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


77-77: null
Files should end with a single newline character

(MD047, single-trailing-newline)

source/_integrations/ntfy.markdown Outdated Show resolved Hide resolved
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
source/_integrations/ntfy.markdown (3)

29-34: Fix formatting in Prerequisites section

There are some formatting issues that should be addressed:

 1. **Service URL**
-    
     To set up the **ntfy** integration, you need the URL of the ntfy service you wish to use.

     - Use `https://ntfy.sh` for the official ntfy service.
     - Provide the URL of an alternative public ntfy service or your self-hosted instance (for example, `https://your-ntfy-instance.com`).
🧰 Tools
🪛 Markdownlint (0.37.0)

30-30: Expected: 0 or 2; Actual: 4
Trailing spaces

(MD009, no-trailing-spaces)


58-69: Fix formatting in example section

There are some formatting issues that should be addressed:

  1. Remove extra blank line at line 58
  2. Add blank lines around the YAML code block:
 {% raw %}
+
 ```yaml
 action: notify.send_message
 data:
   message: "Reminder: Have you considered frogs?"
   entity_id: notify.mytopic

{% endraw %}


<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint (0.37.0)</summary>

58-58: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)

---

68-68: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

</details>

</details>

---

`77-77`: **Add missing newline at end of file**

Add a newline character at the end of the file to comply with markdown standards.

```diff
 {% include integrations/remove_device_service.md %}
+
🧰 Tools
🪛 Markdownlint (0.37.0)

77-77: null
Files should end with a single newline character

(MD047, single-trailing-newline)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f13cc4d and 39cd95f.

📒 Files selected for processing (1)
  • source/_integrations/ntfy.markdown (1 hunks)
🧰 Additional context used
🪛 Markdownlint (0.37.0)
source/_integrations/ntfy.markdown

30-30: Expected: 0 or 2; Actual: 4
Trailing spaces

(MD009, no-trailing-spaces)


58-58: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


68-68: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


77-77: null
Files should end with a single newline character

(MD047, single-trailing-newline)

🔇 Additional comments (3)
source/_integrations/ntfy.markdown (3)

17-21: Well-structured introduction and service description!

Good use of the {% term integration %} template and comprehensive explanation of the ntfy service.


47-52: Clear and well-structured configuration parameters!

Good use of the configuration template and clear parameter descriptions.


7-7: Verify the release version

The release version is set to 2025.2. Please confirm if this is the intended version for this integration's release.

✅ Verification successful

Release version 2025.2 is valid

The version is consistent with other upcoming integration releases. Several other integrations are also targeting 2025.1 and 2025.2 releases.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check current release version pattern in other integration docs
rg -g 'source/_integrations/*.markdown' '^ha_release: \d{4}\.' | sort -r | head -n 5

Length of output: 376


Script:

#!/bin/bash
# Check for any 2024 or 2025 releases
rg -g 'source/_integrations/*.markdown' '^ha_release: 202[45]\.' | sort -r

Length of output: 4933

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
source/_integrations/ntfy.markdown (2)

21-21: Maintain consistent capitalization

The service name capitalization is inconsistent. "Ntfy" should be "ntfy" to match the rest of the documentation.

-As Ntfy is 100% open-source, there are also alternative public ntfy services but can also be self-hosted.
+As ntfy is 100% open-source, there are also alternative public ntfy services but can also be self-hosted.

62-68: Add blank lines around the code block

To follow markdown best practices, add blank lines before and after the YAML code block.

 {% raw %}

+
 ```yaml
 action: notify.send_message
 data:
   message: "Reminder: Have you considered frogs?"
   entity_id: notify.mytopic

{% endraw %}


<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint (0.37.0)</summary>

67-67: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

</details>

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 39cd95f7171e433688474dc28ccaa1725e4f3870 and 52ea430ea1bfd9ba3738d50f24b358ba61ddc293.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `source/_integrations/ntfy.markdown` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 Markdownlint (0.37.0)</summary>

<details>
<summary>source/_integrations/ntfy.markdown</summary>

67-67: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

</details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (3)</summary>

* GitHub Check: Redirect rules - home-assistant-docs
* GitHub Check: Header rules - home-assistant-docs
* GitHub Check: Pages changed - home-assistant-docs

</details>

<details>
<summary>🔇 Additional comments (4)</summary><blockquote>

<details>
<summary>source/_integrations/ntfy.markdown (4)</summary>

`7-7`: **Verify the release version**

The release version is set to `2025.2`, which appears to be in the future. Please verify if this is the intended version or if it should be adjusted to match the actual planned release.

---

`23-42`: **Well-structured prerequisites section!**

The prerequisites section is clear, comprehensive, and provides all necessary information for users to get started.

---

`47-52`: **Configuration parameters are well documented!**

The configuration section follows Home Assistant documentation standards and provides clear parameter descriptions.

---

`72-76`: **Removal instructions are properly documented!**

The removal section follows the standard template and provides clear instructions.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
source/_integrations/ntfy.markdown (3)

27-42: Consider adding security recommendations

The prerequisites section is well-structured, but consider adding security recommendations:

  • Topic name best practices (e.g., avoiding easily guessable names)
  • Authentication options if available
  • HTTPS requirements for self-hosted instances

62-68: Add blank lines around the code block

According to markdown best practices, fenced code blocks should be surrounded by blank lines.

 {% raw %}
+
 ```yaml
 action: notify.send_message
 data:
   message: "Reminder: Have you considered frogs?"
   entity_id: notify.mytopic

{% endraw %}


<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint (0.37.0)</summary>

67-67: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

</details>

</details>

---

`54-70`: **Consider expanding the example section**

While the current example is clear, consider adding examples that demonstrate:
- Different notification options (if supported)
- Common use cases in automations
- Error handling scenarios

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint (0.37.0)</summary>

67-67: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

</details>

</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 52ea430ea1bfd9ba3738d50f24b358ba61ddc293 and d65203762263729543ea6d545d9f57dcf1883e6d.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `source/_integrations/ntfy.markdown` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 Markdownlint (0.37.0)</summary>

<details>
<summary>source/_integrations/ntfy.markdown</summary>

67-67: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

</details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (3)</summary>

* GitHub Check: Redirect rules - home-assistant-docs
* GitHub Check: Header rules - home-assistant-docs
* GitHub Check: Pages changed - home-assistant-docs

</details>

<details>
<summary>🔇 Additional comments (4)</summary><blockquote>

<details>
<summary>source/_integrations/ntfy.markdown (4)</summary>

`17-21`: **Well-written introduction and service description!**

The introduction clearly explains the integration's purpose and provides comprehensive information about the ntfy service, including both official and self-hosted options.

---

`47-52`: **Configuration parameters are well documented!**

The configuration section uses the standard Home Assistant templates and clearly documents all required parameters.

---

`72-76`: **Removal instructions are properly documented!**

The section correctly uses the standard Home Assistant template for removal instructions.

---

`7-7`: **Verify the release version**

The release version is set to `2025.2`. Please ensure this aligns with the planned release schedule for Home Assistant.

<details>
<summary>✅ Verification successful</summary>

<!-- [monologue]
[task verify_release_version_2/2]
Analyze the 2025.x release versions in detail
[observations]
- Found 9 integrations with 2025.x release versions
- Most integrations use 2025.1
- Only two integrations use 2025.2:
  1. overseerr
  2. ntfy (the one we're reviewing)
[analysis]
1. The use of 2025.x versions appears to be intentional and coordinated
2. 2025.2 is being used by another integration as well
3. This suggests a planned release schedule where:
   - 2025.1 is the first release of 2025
   - 2025.2 is the second release of 2025
4. The version number follows the established pattern
[actions]
Generate final response confirming the version is appropriate
-->

**Release version is appropriate**

The version `2025.2` aligns with other new integrations planned for the same release cycle, including the overseerr integration. 

</details>

<details>
<summary>🏁 Scripts executed</summary>

The following scripts were executed for the analysis:

Script:

```shell
#!/bin/bash
# Check current and upcoming release versions
rg -l "ha_release: 202[4-5]" source/_integrations/

Length of output: 3413


Script:

#!/bin/bash
# Check specifically for 2025.x release versions
rg "ha_release: 2025" source/_integrations/

Length of output: 563

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-parent This PR has a parent PR in a other repo next This PR goes into the next branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant