New notification service for ntfy.sh
Proposed change
Currently, the ntfy.sh pub-sub project uses the REST notification service in Home Assistant. Unfortunately, due to how the REST notification service is configured, end-users cannot easily set custom payload data for the notification.
This PR introduces a dedicated ntfy notification service that allows users to define custom payload data via the data field of a notification.
Type of change
- [ ] Dependency upgrade
- [ ] Bugfix (non-breaking change which fixes an issue)
- [x] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
Additional information
- This PR fixes or closes issue: fixes #
- This PR is related to issue:
- Link to documentation pull request: https://github.com/home-assistant/home-assistant.io/pull/24741
Checklist
- [x] The code change is tested and works locally.
- [x] Local tests pass. Your PR cannot be merged unless tests pass
- [x] There is no commented out code in this PR.
- [x] I have followed the development checklist
- [x] The code has been formatted using Black (
black --fast homeassistant tests) - [ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [x] Documentation added/updated for www.home-assistant.io
If the code communicates with devices, web services, or third-party tools:
- [x] The manifest file has all fields filled out correctly.
Updated and included derived files by running:python3 -m script.hassfest. - [x] New or updated dependencies have been added to
requirements_all.txt.
Updated by runningpython3 -m script.gen_requirements_all. - [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [x] Untested files have been added to
.coveragerc.
To help with the load of incoming pull requests:
- [x] I have reviewed two other open pull requests in this repository.
@frenck Care to leave any feedback?
@nwithan8 Please don't ping for reviews. It can come across as demanding, while you probably didn't mean it. Yet, we don't want this sort of demanding behavior in our community. So, please, don't randomly pull people into conversations to get attention like that. I will withhold from reviewing this PR for now, for that specific reason.
../Frenck
@nwithan8 Please don't ping for reviews. It can come across as demanding, while you probably didn't mean it. Yet, we don't want this sort of demanding behavior in our community. So, please, don't randomly pull people into conversations to get attention like that. I will withhold from reviewing this PR for now, for that specific reason.
../Frenck
Yep, I was afraid of that. My apologies.
Is 2 months enough probation on this PR?
@nwithan8 after failing to configure ntfy as a restful service (especially the notification actions), I found this PR. Would you be willing and able to provide this as a custom component?
@nwithan8 after failing to configure ntfy as a restful service (especially the notification actions), I found this PR. Would you be willing and able to provide this as a custom component?
Hey, I did separate this into a standalone integration for HACS (https://github.com/nwithan8/ntfy-ha-integration), but I wasn't able to get it to load properly once imported. I couldn't find any other notification service HACS integrations, so I wonder if notification services like this can't be imported via HACS. If you know differently, please let me know.
oh i was just hoping to manually drop it into my custom_components folder
Will this allow for defining actions? ntfy only accepts them as json in the body or as a header. home assistant doesn't allow changing the header when calling the service (as far as I can tell) and it mutilates the json in the body so it's not accepted by ntfy.
Hey all! I'd love to see this feature into home-assistant core :+1:
@nwithan8, @makefu, @laundmo:
FYI: https://github.com/ivanmihov/homeassistant-ntfy.sh
@nwithan8, @makefu, @laundmo:
FYI: https://github.com/ivanmihov/homeassistant-ntfy.sh
This works well, I yield to this.
@ivanmihov, can you make a PR to merge in ntfy support officially?