Skip to content

Commit e6eab79

Browse files
LukasQclaude
andcommitted
Add Threema integration documentation
Add user documentation for the new Threema integration targeting HA 2026.4. Covers E2E encrypted messaging via Threema Gateway, config flow setup, send_message action, and QR code verification entity. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 76b06fa commit e6eab79

File tree

2 files changed

+101
-0
lines changed

2 files changed

+101
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ node_modules
1616
source/.jekyll-metadata
1717
*.iml
1818
.idea/
19+
.claude/
1920
.vscode/*
2021
!.vscode/cSpell.json
2122
!.vscode/extensions.json
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
title: Threema
3+
description: Instructions on how to send Threema messages from Home Assistant.
4+
ha_category:
5+
- Notifications
6+
ha_release: "2026.4"
7+
ha_config_flow: true
8+
ha_iot_class: Cloud Push
9+
ha_domain: threema
10+
ha_platforms:
11+
- image
12+
ha_integration_type: service
13+
ha_codeowners:
14+
- '@LukasQ'
15+
---
16+
17+
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).
18+
19+
## Prerequisites
20+
21+
- 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 requesting.
22+
- A Gateway ID (starts with `*`) — either an existing one or a new one created during setup.
23+
- An API secret from the Threema Gateway dashboard.
24+
- Message credits on your Threema Gateway account. Sending a message costs **1,600 credits with E2E mode** or **800 credits with basic mode**.
25+
26+
**Note:** Setting up Threema Gateway is a two-step process:
27+
28+
1. **Generate encryption keys**: The integration generates a public and private key pair. You then need to 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.
29+
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.
30+
31+
## Setup
32+
33+
During setup, you can choose between two options:
34+
35+
- **Create a new Gateway ID**: The integration generates an encryption key pair for you. Save the displayed keys — they cannot be recovered later. Then enter the Gateway ID and API secret from the Threema Gateway dashboard.
36+
- **Use an existing Gateway ID**: Enter your Gateway ID, API secret, and optionally your private and public keys for end-to-end encryption.
37+
38+
{% include integrations/config_flow.md %}
39+
40+
## QR code entity
41+
42+
When a public key is configured, the integration creates an **image entity** displaying a QR code. This QR code can be scanned by Threema users to verify the gateway identity. The QR code encodes the Gateway ID and public key in the format used by the Threema app.
43+
44+
## Actions
45+
46+
### Action `threema.send_message`
47+
48+
Send a text message to a Threema user.
49+
50+
| Data attribute | Optional | Description |
51+
| -------------- | -------- | ----------- |
52+
| `config_entry_id` | yes | The config entry to use. Auto-selected if only one is configured. |
53+
| `recipient` | no | The 8-character Threema ID of the recipient. |
54+
| `message` | no | The text message to send (max 3,500 characters). |
55+
56+
### Examples
57+
58+
#### Send a simple text message
59+
60+
```yaml
61+
action: threema.send_message
62+
data:
63+
recipient: "YOUR_THREEMA_ID"
64+
message: "The front door was just opened!"
65+
```
66+
67+
#### Send a message from an automation
68+
69+
```yaml
70+
automations:
71+
- alias: "Notify on door open"
72+
triggers:
73+
- trigger: state
74+
entity_id: binary_sensor.front_door
75+
to: "on"
76+
actions:
77+
- action: threema.send_message
78+
data:
79+
recipient: "YOUR_THREEMA_ID"
80+
message: "Front door opened!"
81+
```
82+
83+
#### Send a message with a template
84+
85+
{% raw %}
86+
87+
```yaml
88+
action: threema.send_message
89+
data:
90+
recipient: "YOUR_THREEMA_ID"
91+
message: "Temperature is {{ states('sensor.temperature') }}°C"
92+
```
93+
94+
{% endraw %}
95+
96+
## Known limitations
97+
98+
- **Text messages only** — images, files, and other media are not supported.
99+
- **No group messaging** — only 1-to-1 messages are supported.
100+
- **Send only** — receiving messages is not supported.

0 commit comments

Comments
 (0)