README.md aktualisiert

This commit is contained in:
2026-04-14 16:19:46 +00:00
parent f346cea41a
commit c536a75f4c

126
README.md
View File

@@ -1,57 +1,57 @@
# WhatsApp Bridge Integration for Home Assistant 🚀 # WhatsApp Bridge for Home Assistant
This is the custom integration for the **Bahmcloud WhatsApp Bridge**. It allows you to manage multiple WhatsApp accounts as Home Assistant services, making it incredibly easy to send automated messages via YAML or Node-RED. A professional, seamless integration to send WhatsApp messages through the **Bahmcloud Bridge**. This integration supports multiple profiles, dynamic entity-based selection, and broadcast capabilities with native Home Assistant support.
--- ## 🚀 Installation
## 🛠️ Installation ### 1. Install the Add-on
The **Bahmcloud WhatsApp Bridge Add-on** must be running for the integration to work:
### 1. Prerequisite: The Add-on 1. Navigate to **Settings** -> **Add-ons**.
Before installing this integration, ensure that the **WhatsApp Bridge Add-on** is installed and running. 2. Click **Add-on Store** -> Three dots (top right) -> **Repositories**.
* [Link to your Add-on Repository] 3. Add your Bahmcloud Repository URL.
* Open the Add-on Web UI and scan the QR code to link your WhatsApp account. 4. Search for "WhatsApp Bridge", click **Install**, and **Start**.
### 2. Install the Integration ### 2. Install the Integration
1. Copy the folder `whatsapp_bridge_integration` into your Home Assistant `config/custom_components/` directory. You can install the integration component via three methods:
2. Restart Home Assistant.
3. Go to **Settings** -> **Devices & Services**. * **HACS (Recommended):** Add this repository as a "Custom Repository" in HACS and click Install.
4. Click **Add Integration** and search for "WhatsApp Bridge Integration". * **BCS (Bahmcloud Store):** Search for "WhatsApp Bridge" in the BCS interface.
* **Manual:** Copy the `custom_components/whatsapp_bridge_integration` folder into your `/config/custom_components/` directory and restart Home Assistant.
--- ---
## 📖 How to use ## 👥 Configuration & Profiles
Once installed, the integration provides a new service (action) that you can use in any automation. Add your WhatsApp accounts via the Home Assistant UI:
1. Go to **Settings** -> **Devices & Services**.
2. Click **Add Integration** and search for **WhatsApp Bridge**.
3. Follow the setup to add an **Account Name** (e.g., "Work") and your **Phone Number**.
4. **Repeat** this process for as many accounts as you need.
### Send a Message via YAML ### Resulting Entities
You can call the service directly in your automations: The integration automatically creates sensors for your UI:
* `sensor.whatsapp_account_name`: An entity for each individual account.
* `sensor.whatsapp_broadcast_all`: A global entity to message all accounts at once.
---
## 🛠 Usage
### Action: `send_message`
This integration registers a service/action to send messages.
**Fields:**
* **Recipient:** Select an account from the dropdown, choose the "Broadcast" entity, or manually type a phone number.
* **Message:** The text content you wish to send.
#### YAML Example:
```yaml ```yaml
action: whatsapp_bridge_integration.send_message action: whatsapp_bridge_integration.send_message
data: data:
number: "491701234567" recipient: "sensor.whatsapp_rene"
message: "The washing machine is finished! 🧺" message: "The garage door is still open!"
``` ```
### Use in Node-RED
Add a Call Service (or Action) node.
Domain: whatsapp_bridge_integration
Service: send_message
Data:
```JSON
{
"number": "491701234567",
"message": "{{payload}}"
}
```
## 👥 Multi-Account Support (Coming Soon)
We are currently working on a UI-based configuration flow so you can save "Account Aliases" (like "Dad", "Work", "Security") and select them from a dropdown menu without typing the phone number every time.
## ⚠️ Important Notes ## ⚠️ Important Notes
Phone Numbers: Always use the international format without + or 00 (e.g., 49... for Germany). Phone Numbers: Always use the international format without + or 00 (e.g., 49... for Germany).
@@ -60,3 +60,53 @@ Local Network: The integration communicates locally with the Add-on on port 3000
Developed by Bahmcloud Developed by Bahmcloud
--- ---
## 🤖 Node-RED Integration
The integration is fully compatible with Node-RED. Since it uses native entities, you can use the standard *Action (Call Service)* node.
### Example: Smart Window Warning
Notify yourself if a window or door has been left open for 15 minutes.
1. *Trigger*: Use a `State Trigger` or `Device` node.
2. *Logic (Change Node)*: Use JSONata to create a dynamic message:
- *Set*: msg.payload
- *Value (JSONata)*: `payload.to_state.attributes.friendly_name & " has been open for 15 minutes!"`
3. WhatsApp Node (Action Node):
- *Action*: `whatsapp_bridge_integration.send_message`
- *Data (JSON)*:
```JSON
{
"recipient": "sensor.whatsapp_broadcast_all",
"message": "{{payload}}"
}
```
### Manual Tool Calling
To send a message to a number not saved as a profile, simply pass the raw phone number to the recipient field in your Node-RED JSON:
```JSON
{
"recipient": "491701234567",
"message": "Direct alert to external number."
}
```
---
# ✨ Features
- *Dynamic UI*: Accounts are automatically added to the recipient dropdown.
- *One-Click Broadcast*: Special entity to reach all configured profiles instantly.
- *Manual Fallback*: Clean UI remains flexible; type any number to bypass profiles.
- *Developer Friendly*: Designed for easy integration with Node-RED and HA Automations.
---
Maintained by Bahmcloud