Home Assistant alerts to your phone with NextMsg

Updated November 22, 2026

Any Home Assistant automation can send a push to your phone through NextMsg: the garage door left open, the washing machine done, a leak sensor going off. Install the NextMsg integration and set it up in the UI with a code from the app, or add one rest_command with nothing to install.

Install the integration

The NextMsg integration needs Home Assistant 2026.10 or later and the NextMsg app 1.4 or later. Install it with HACS:

  1. In HACS, open the ⋮ menu → Custom repositories, add https://github.com/nextmsg-app/home-assistant with the type Integration.
  2. Search for NextMsg in HACS, download it, and restart Home Assistant.
  3. Open Settings → Devices & services → Add integration → NextMsg and choose Connect with a code from the app.
  4. In the app, open Settings → Agents → Connect agent and enter the code it shows in Home Assistant. Codes work once, for 5 minutes.
  5. Pick a channel name, like home.

Home Assistant gets its own key and shows up under Agents in the app, where you can rename or revoke it. Without HACS, copy the custom_components/nextmsg folder from the repository into your config/custom_components/ folder and restart.

Send with the integration

Each channel is a notify entity, like notify.nextmsg_home. Use it with the standard Notifications: Send a notification message action; the title is shown in bold on the first line:

actions:
  - action: notify.send_message
    target:
      entity_id: notify.nextmsg_home
    data:
      title: Garage
      message: "The door has been open for 10 minutes"

To add a channel, open the NextMsg integration and choose Add channel: each one gets its own entity and its own tab in the app. If a message can't be sent, the action fails with the reason. If the key is revoked or rotated, Home Assistant asks you to connect again.

Or use a REST command

Prefer nothing to install? A rest_command in your configuration does the same with plain YAML.

What you need

The NextMsg app and your send key from Settings (nextmsg_live_…). With app 1.4 or later you can instead give Home Assistant its own key from Settings → Agents → Connect agent, which you can revoke on its own later. Either key goes in a header.

Add a REST command

Put the key in secrets.yaml, so it isn't in your configuration:

nextmsg_auth: "Bearer nextmsg_live_YOUR_KEY"

Then add this to configuration.yaml and restart Home Assistant:

rest_command:
  nextmsg:
    url: "https://api.nextmsg.app/v1/send"
    method: post
    headers:
      authorization: !secret nextmsg_auth
    content_type: "application/json"
    payload: '{{ {"message": message, "channel": channel | default("home")} | to_json }}'

The to_json filter builds the JSON body, so quotes or line breaks in a message can't break it. Messages are up to 640 characters; channel is optional (1-32 characters, a-z, 0-9, -, _).

Use it in an automation

Call rest_command.nextmsg like any other action:

automation:
  - alias: "Garage door left open"
    triggers:
      - trigger: state
        entity_id: cover.garage_door
        to: "open"
        for: "00:10:00"
    actions:
      - action: rest_command.nextmsg
        data:
          message: "Garage door has been open for 10 minutes"
          channel: home

To try it first, open Developer tools → Actions, pick REST Command: nextmsg and send a message.

Check that it was sent

The action returns the HTTP status. NextMsg answers 200 when the message is on its way, 401 for a wrong or revoked key, 402 when the free monthly limit is reached:

actions:
  - action: rest_command.nextmsg
    data:
      message: "Washing machine finished"
    response_variable: nextmsg_result
  - if: "{{ nextmsg_result['status'] != 200 }}"
    then:
      - action: persistent_notification.create
        data:
          message: "NextMsg answered {{ nextmsg_result['status'] }}"

Tips

  • Use channels to sort alerts: home, security, energy. Each gets a tab in the app.
  • Messages can use **bold**, *italic* and `code`, and templates work in message, for example "{{ states('sensor.outdoor_temperature') }} °C outside".
  • NextMsg is one-way: nothing can be sent back into Home Assistant through it. Your home alerts land in the same inbox as your servers, CI jobs and AI agents.
  • Free inboxes get 100 messages a month; for frequent alerts, Pro is a one-time purchase.

More guides