# Mobile notifications

FailureNTS™ can send Home Assistant Companion App notifications to users who have explicitly enabled them in the Note to self panel.

## How it works

1. Home Assistant creates `notify.mobile_app_<device>` services when a user signs in with the Home Assistant Companion App.
2. FailureNTS asks Home Assistant for `mobile_app` config entries and matches them to the currently logged-in Home Assistant user.
3. The panel only shows mobile devices that can be matched unambiguously to that same user.
4. The selected targets are saved as per-user preferences in Home Assistant storage.
5. When a shared note/category event needs a notification, FailureNTS re-checks the current allowed devices before calling `notify.mobile_app_*`.

There are no hardcoded personal device names in the public package. Device labels come from the local Home Assistant instance and are shown only to that logged-in user.

## Enable notifications

1. Install and open the Home Assistant Companion App on the phone/tablet.
2. Sign in as the same Home Assistant user that uses FailureNTS.
3. In Home Assistant, confirm that a service like `notify.mobile_app_<device>` exists under **Developer Tools → Services**.
4. Open **Note to self**.
5. Open the top-right menu.
6. Enable **Mobile notifications**.
7. Tick the device(s) that should receive FailureNTS notifications.

## If no device appears

Check these in order:

1. Open the Home Assistant Companion App once so it can register with Home Assistant.
2. In Home Assistant, go to **Settings → Devices & services → Mobile App** and confirm the device exists.
3. Confirm the device is linked to the same Home Assistant user that is currently logged in.
4. Check that the `notify.mobile_app_<device>` service exists.
5. Restart Home Assistant after first installing the integration or after major mobile-app changes.
6. Refresh the Note to self page and reopen the menu.

## Privacy note

FailureNTS stores only the selected notify service names in the user's own preference bucket. It does not ship with any personal notification targets, user names, IP addresses, note content, or uploaded attachments.
