Guides menu
Start
All guidesGuides
Uptime Kuma alerts on your iPhoneApprove a GitHub deploy from your iPhoneHome Assistant alerts on your iPhone and Apple WatchForms on your site
Add your Nowlark form to WordPressAdd your Nowlark form to WordPress.comAdd your Nowlark form to WixAdd your Nowlark form to WebflowAdd your Nowlark form to GhostAdd your Nowlark form to Google SitesAdd your Nowlark form to a site you build yourselfReference
API referenceSupportHome Assistant alerts on your iPhone and Apple Watch
One rest_command sends any Home Assistant automation to your iPhone and Apple Watch, each alert with its own sender and priority.
Each alert names its own sender, such as Garage or Washer, and its own priority, so the garage can break through a Focus while the washing machine stays quiet. When your iPhone is locked, your Apple Watch shows it too, as it does any iPhone notification.
What you need#
- Nowlark on your iPhone, and your key from Settings › Connect an App › Create Your Key. Copy it when it is shown, because it is shown once. It starts
nlk_. - Home Assistant, and a way to edit the files in its
configfolder.secrets.yamlsits besideconfiguration.yaml; create it if it is missing.
1. Store your key#
Add this line to secrets.yaml, with your own key in place of nlk_…:
nowlark_api_key: "nlk_…"
2. Add the command#
Add this to configuration.yaml. If the file already has a rest_command: line, put the nowlark: part under that one instead:
rest_command:
nowlark:
url: https://nowlark.com/v1/notify
method: post
headers:
X-Nowlark-Key: !secret nowlark_api_key
content_type: application/json
payload: >
{{ {"source": source | default("Home Assistant"),
"title": title,
"body": message | default(""),
"priority": priority | default(0)} | to_json }}
Your key travels in the X-Nowlark-Key header, which Nowlark takes the same as Authorization: Bearer. This gives every automation an action called rest_command.nowlark that takes a title, and optionally a message, a source (the sender name on your phone) and a priority.
3. Use it in an automation#
This one tells you when the garage door has been open for ten minutes. Add it to the end of automations.yaml, change binary_sensor.garage_door to your own sensor, then restart Home Assistant:
- alias: Garage door left open
triggers:
- trigger: state
entity_id: binary_sensor.garage_door
to: "on"
for: "00:10:00"
actions:
- action: rest_command.nowlark
data:
source: Garage
title: The garage door is still open
message: "Open since {{ as_local(states.binary_sensor.garage_door.last_changed).strftime('%H:%M') }}"
priority: 1
Pick a priority per alert#
priority |
On your iPhone |
|---|---|
-1 |
Low: silent, no sound |
0 |
Normal: sound and a banner |
1 |
High: breaks through a Focus |
2 |
Urgent: breaks through a Focus and repeats until you open it |
Priority and repeat until opened has the details. Give each kind of alert its own source, such as Garage, Washer or Alarm, and the app's Sources tab lets you mute or colour each one on its own.
Send a notification lists every other field the command can pass on, such as a link to open.