Français : README.fr.md
Send SMS from Home Assistant through the Swisscom Messaging API. You provide
your Swisscom client_id, and a notify service appears in Home Assistant,
ready to use in automations, scripts and scenes.
- A subscription to the Swisscom Messaging API (SMS product) on the
Swisscom developer portal, which gives
you a
client_id. - Home Assistant 2026.3.0 or newer, required for the brand icons shipped inside the integration.
Until this repository is part of the HACS default store, add it manually:
- HACS → menu ⋮ → Custom repositories.
- Add
https://github.com/Sdavid66/Swisscom-SMS, category Integration. - Install Swisscom SMS, then restart Home Assistant.
Copy custom_components/swisscom_sms into the custom_components folder of
your Home Assistant configuration, then restart.
- Settings → Devices & services → Add integration.
- Search for Swisscom SMS.
- Enter your Swisscom
client_idand, optionally, the name of the notify service (Swisscom SMSby default).
A notify.swisscom_sms service is created, named after your choice. Adding a
second entry with another client_id creates a second service.
To change the client_id later: integration → Reconfigure.
The service sends one SMS per number listed in target. A valid number starts
with 0, 00 or + and contains 7 to 15 digits — local numbers starting with
0 are prefixed with +41 by Swisscom.
action: notify.swisscom_sms
data:
message: "The garage door was left open."
target:
- "+41791234567"Several recipients:
action: notify.swisscom_sms
data:
message: "Alarm triggered at home!"
target:
- "+41791234567"
- "+41789876543"In an automation:
automation:
- alias: "Water leak alert"
triggers:
- trigger: state
entity_id: binary_sensor.kitchen_leak_detector
to: "on"
actions:
- action: notify.swisscom_sms
data:
message: "Water leak detected in the kitchen!"
target:
- "+41791234567"Send failures are written to the Home Assistant logs (Settings → System → Logs) together with the HTTP status returned by Swisscom:
| Status | Meaning |
|---|---|
400 |
Invalid phone number |
401 |
Missing or incorrect client_id |
429 |
Sending quota exhausted |
The startup warning We found a custom integration swisscom_sms which has not been tested by Home Assistant is normal for every custom integration and
can be ignored.
- One way only. The integration sends SMS; it does not receive them and reports no delivery receipt.
- A failure does not stop an automation. A rejected message is logged as an error, but the service call itself succeeds.
- Legacy notify service. The integration exposes a
notify.<name>service supportingtarget, not a notify entity. - The icon only appears once installed. The HACS dashboard reads its
thumbnails from
data-v2.hacs.xyz, which ignores icons shipped inside an integration (hacs/integration#5171).
This is an independent community project. It is not affiliated with, endorsed by, or supported by Swisscom. Swisscom and the Swisscom logo are trademarks of Swisscom AG.