ntfy
The ntfy integrationIntegrations connect and integrate Home Assistant with your devices, services, and more. [Learn more] allows publishing push notifications on ntfy.sh
About ntfy
ntfy is a simple HTTP-based pub-sub notification service that allows you to send notifications to phones or desktops. The official ntfy
How you can use this integration
The ntfy integration can be used to send push notifications from automations and scripts in real-time to your mobile devices and desktops.
Prerequisites
-
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
).
- Use
-
Authentication (optional)
Depending on whether the server is configured to support access control, some topics may be read/write protected so that only users with the correct credentials can subscribe or publish to them.
The ntfy integration uses access token authentication to access protected topics. When you provide your ntfy username and password, Home Assistant automatically generates and uses an access token for authentication.
-
Adding a topic
To set up topics for notifications, select the three dots
menu next to the entry of the previously configured ntfy service, then click Add topic. You can now choose one of the following options:
- Select Enter topic to add a new topic. Use an existing topic name by retrieving it from the ntfy app or the ntfy serviceβs website. Simply copy and paste the topic name into the configuration.
- Select Generate topic name to allow the integration to generate a random topic name automatically.
Repeat these steps for each topic you want to add.
Topics may not be password-protected, so choose a name thatβs not easy to guess. If you are sending sensitive information, consider reserving the topic and restricting access to it.
Configuration
To add the ntfy integration to your Home Assistant instance, use this My button:
Manual configuration steps
If the above My button doesnβt work, you can also perform the following steps manually:
-
Browse to your Home Assistant instance.
-
In the bottom right corner, select the
Add Integration button. -
From the list, select ntfy.
-
Follow the instructions on screen to complete the setup.
Configuration parameters
Service parameters
Topic parameters
Notifiers
The ntfy integration will add a deviceA device is a model representing a physical or logical unit that contains entities. with an associated notify entityAn entity represents a sensor, actor, or function in Home Assistant. Entities are used to monitor physical properties or to control other entities. An entity is usually part of a device or a service. [Learn more] for each configured topic. To publish notifications, you can use the notify.send_message
actionActions are used in several places in Home Assistant. As part of a script or automation, actions define what is going to happen once a trigger is activated. In scripts, an action is called sequence. [Learn more]. To use notifications, please see the getting started with automation page.
Example YAML configuration
action: notify.send_message
data:
message: "Reminder: Have you considered frogs?"
entity_id: notify.mytopic
Sensors
The ntfy integration adds a device representing the service, along with various sensors that display your usage statistics and current account limits.
π Message stats
- Messages published: The total number of messages sent today.
- Messages remaining: The number of messages that can still be sent before the daily limit is reached.
- Messages usage limit: The maximum number of messages allowed per day on the account.
- Messages expiry duration: The duration for which published messages are cached before automatic deletion.
βοΈ Email stats
- Emails sent: The number of email notifications sent today.
- Emails remaining: The number of email notifications that can still be sent today.
- Email usage limit: The daily limit for email notifications on the account.
π Phone call stats
- Phone calls made: The total phone call alerts made today.
- Phone calls remaining: The number of phone call alerts that can still be made today.
- Phone calls usage limit: The maximum number of phone call alerts allowed per day on the account.
π Reserved topics
- Reserved topics: The number of reserved topics currently assigned to the account.
- Reserved topics remaining: The number of topics that can still be reserved.
- Reserved topics limit: The maximum number of reserved topics allowed for the account.
π Attachment stats
- Attachment storage: The amount of storage space currently used by file attachments.
- Attachment storage remaining: The remaining storage capacity available for attachments.
- Attachment storage limit: The total storage quota allocated for attachments.
- Attachment expiry duration: The duration attachments are retained before being automatically deleted.
- Attachment file size limit: The maximum allowed size for a single attachment file.
- Attachment bandwidth limit: The daily bandwidth cap for uploading and downloading attachments.
β Account
- Subscription tier: The subscription plan currently assigned to the ntfy account.
Known limitations
ntfy imposes various rate and usage limits. The official ntfy.sh
Additional usage limits depend on your account tier. To view your current limits, go to Account β Usage
Limits may vary when using other ntfy services. If youβre using a self-hosted instance, you can configure higher limits or disable them entirely.
Troubleshooting
The ntfy integration relies on an active internet connection to communicate with the ntfy service. If you encounter issues, verify that your network connection is stable and the ntfy service is reachable. Additionally, the ntfy service itself may experience downtime, whether unexpected or due to scheduled maintenance.
In any case, when reporting an issue, please enable debug logging, restart the integration, and as soon as the issue reoccurs, stop the debug logging again (download of debug log file will start automatically). Further, if still possible, please also download the diagnostics data. If you have collected the debug log and the diagnostics data, provide them with the issue report.
Removing the integration
This integration can be removed by following these steps:
To remove an integration instance from Home Assistant
- Go to Settings > Devices & services and select the integration card.
- From the list of devices, select the integration instance you want to remove.
- Next to the entry, select the three dots
menu. Then, select Delete.