-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Threema Integration Docs #44160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
LukasQ
wants to merge
18
commits into
home-assistant:next
Choose a base branch
from
LukasQ:threema-integration
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Threema Integration Docs #44160
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
e6eab79
Add Threema integration documentation
HoneysHope 45aa4c0
Fix automation YAML example format
HoneysHope 386f999
Merge branch 'next' into threema-integration
LukasQ 71f3f6c
remove change that is unrelated to this PR
c0ffeeca7 a6f0b5e
reach for gold
HoneysHope 09c7978
Merge branch 'next' into threema-integration
LukasQ b15f065
Moved to notify entity and dropped image plattform (for now)
HoneysHope 010b81d
Updates, to follow current architecture
HoneysHope 18a66b5
Updated setup section
HoneysHope baaa44c
added feedback
HoneysHope 3847141
Merge branch 'threema-integration' of https://github.com/LukasQ/home-…
HoneysHope 0b16621
exclude .claude
HoneysHope 8083f1d
Apply suggestion from @c0ffeeca7
c0ffeeca7 2cfcd42
Add quality scale to header
c0ffeeca7 8f9c768
Update source/_integrations/threema.markdown
LukasQ 4269dd0
Update source/_integrations/threema.markdown
LukasQ 23abd94
Update source/_integrations/threema.markdown
LukasQ 1e753df
add newline
c0ffeeca7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,157 @@ | ||
| --- | ||
| title: Threema | ||
| description: Instructions on how to send Threema messages from Home Assistant. | ||
| ha_category: | ||
| - Notifications | ||
| ha_release: 2026.4 | ||
| ha_config_flow: true | ||
| ha_iot_class: Cloud Push | ||
| ha_domain: threema | ||
| ha_platforms: | ||
| - notify | ||
| ha_integration_type: service | ||
| ha_quality_scale: bronze | ||
| ha_codeowners: | ||
| - '@LukasQ' | ||
| --- | ||
LukasQ marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| The **Threema** {% term integration %} allows you to send end-to-end encrypted text messages from Home Assistant to [Threema](https://threema.ch) users via the [Threema Gateway](https://gateway.threema.ch) service. This integration is designed for the **E2E (end-to-end) encryption mode** of Threema Gateway, where messages are encrypted locally before being sent. If no private key is configured, the integration falls back to **basic mode** (server-side encryption). | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - A [Threema Gateway](https://gateway.threema.ch) account. For testing purposes, you can [request developer credits](https://gateway.threema.ch) from Threema — make sure to select the **E2E Gateway** configuration when making the request. | ||
| - A Gateway ID (starts with `*`). You can use an existing ID or create a new one during setup. | ||
| - An API secret from the Threema Gateway dashboard. | ||
| - Message credits on your Threema Gateway account. Sending a message costs **1,600 credits with E2E mode** or **800 credits with basic mode**. | ||
|
|
||
| Setting up Threema Gateway is a two-step process: | ||
|
|
||
| 1. Generate encryption keys | ||
| - The integration generates a public and private key pair. | ||
| - Provide the public key when creating your Gateway ID on the Threema Gateway website. | ||
| - As of March 2026, this requires manual approval by Threema, which may take some time. | ||
| 2. Configure the integration | ||
| - Once your Gateway ID is approved, use the Gateway ID, API secret, and the previously generated keys to complete the integration setup in Home Assistant. | ||
|
|
||
| During setup, you can choose between two options: | ||
|
|
||
| - **Add existing Gateway ID**: Enter your Gateway ID, API secret, and your private and public keys to configure an existing Threema Gateway. | ||
| - **Generate new encryption keys**: The integration generates an encryption key pair and displays them. Save the keys — they cannot be recovered later. Then register a new Gateway ID at [gateway.threema.ch](https://gateway.threema.ch) using the generated public key, and complete setup with your Gateway credentials. | ||
|
|
||
| {% include integrations/config_flow.md %} | ||
| {% configuration_basic %} | ||
| Gateway ID: | ||
| description: "Your Threema Gateway ID (starts with `*` and is 8 characters total)." | ||
| API secret: | ||
| description: "The API secret from your Threema Gateway dashboard." | ||
| Private key: | ||
| description: "Optional for basic mode, required for end-to-end encryption mode." | ||
| Public key: | ||
| description: "Optional for basic mode, required for end-to-end encryption mode." | ||
| {% endconfiguration_basic %} | ||
|
|
||
| ## Recipients | ||
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| After setting up the gateway, add recipients as **subentries**. Go to **Settings** > **Devices & services** > **Threema**, select your gateway, and use **Add recipient**. Enter the 8-character Threema ID of the person you want to message and optionally a friendly display name (e.g., "Dad"). Each recipient creates a dedicated **notify entity**. | ||
|
|
||
| ## Entities | ||
|
|
||
| ### Notify | ||
|
|
||
| Each recipient subentry creates a notify entity (e.g., `notify.threema_ab1cd2ef`). | ||
|
|
||
| ## Actions | ||
|
|
||
| ### Action `notify.send_message` | ||
|
|
||
| Send a text message to a Threema recipient via its notify entity. | ||
|
|
||
| | Data attribute | Optional | Description | | ||
| | -------------- | -------- | ----------- | | ||
| | `message` | no | The text message to send. | | ||
| | `title` | yes | An optional title, shown in bold before the message. | | ||
|
|
||
| ### Examples | ||
|
|
||
| #### Send a simple text message | ||
|
|
||
| ```yaml | ||
| action: notify.send_message | ||
| target: | ||
| entity_id: notify.threema_YOUR_THREEMA_ID | ||
| data: | ||
| message: "The front door was just opened!" | ||
| ``` | ||
|
|
||
| #### Send a message with a title | ||
|
|
||
| ```yaml | ||
| action: notify.send_message | ||
| target: | ||
| entity_id: notify.threema_YOUR_THREEMA_ID | ||
| data: | ||
| title: "Security Alert" | ||
| message: "Motion detected in the backyard." | ||
| ``` | ||
|
|
||
| #### Send a message from an automation | ||
|
|
||
| ```yaml | ||
| alias: "Notify on door open" | ||
| triggers: | ||
| - trigger: state | ||
| entity_id: binary_sensor.front_door | ||
| to: "on" | ||
| actions: | ||
| - action: notify.send_message | ||
| target: | ||
| entity_id: notify.threema_YOUR_THREEMA_ID | ||
| data: | ||
| message: "Front door opened!" | ||
| ``` | ||
LukasQ marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| #### Send a message with a template | ||
|
|
||
| {% raw %} | ||
|
|
||
| ```yaml | ||
| action: notify.send_message | ||
| target: | ||
| entity_id: notify.threema_YOUR_THREEMA_ID | ||
| data: | ||
| message: "Temperature is {{ states('sensor.temperature') }}°C" | ||
| ``` | ||
|
|
||
| {% endraw %} | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| ### "Invalid authentication" during setup | ||
|
|
||
| Double-check that your Gateway ID starts with `*` and is exactly 8 characters. Verify the API secret matches what is shown on the [Threema Gateway dashboard](https://gateway.threema.ch). | ||
|
|
||
| ### Messages not arriving | ||
|
|
||
| - Make sure you have sufficient credits on your Threema Gateway account. | ||
| - Verify the recipient's Threema ID is correct (8 alphanumeric characters). | ||
| - Check **Settings** > **System** > **Logs** for error details from the `threema` integration. | ||
|
|
||
| ### "Config entry not loaded" when sending a message | ||
|
|
||
| The integration failed to initialize. Go to **Settings** > **Devices & services** > **Threema** and check the integration status. You may need to remove and re-add the integration. | ||
|
|
||
| ## Removing the integration | ||
|
|
||
| This integration follows standard integration removal, no additional steps are required after removing it. | ||
|
|
||
| ## Known limitations | ||
|
|
||
| - **Text messages only** — images, files, and other media are not supported. | ||
| - **No group messaging** — only 1-to-1 messages are supported. | ||
| - **Send only** — receiving messages is not supported. | ||
LukasQ marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## Removing the integration | ||
|
|
||
| This integration follows standard integration removal. | ||
|
|
||
| {% include integrations/remove_device_service.md %} | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.