mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Apply feedback from previous SMS doc update (#23864)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
430c79ccad
commit
4c6624a761
@ -61,6 +61,7 @@ Every time there is a message received, `event: sms.incoming_sms` is fired with
|
|||||||
Sample automation that forward all SMS to `user1`:
|
Sample automation that forward all SMS to `user1`:
|
||||||
|
|
||||||
#### Define a sensor in `configuration.yaml` to protect user phone number
|
#### Define a sensor in `configuration.yaml` to protect user phone number
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
template:
|
template:
|
||||||
- sensor:
|
- sensor:
|
||||||
@ -74,16 +75,16 @@ template:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
notify_sms_user1:
|
notify_sms_user1:
|
||||||
alias: Notify via SMS to User1
|
alias: "Notify via SMS to User1"
|
||||||
fields:
|
fields:
|
||||||
message:
|
message:
|
||||||
description: The message content
|
description: "The message content"
|
||||||
example: The light is on!
|
example: "The light is on!"
|
||||||
sequence:
|
sequence:
|
||||||
- service: notify.sms
|
- service: notify.sms
|
||||||
data:
|
data:
|
||||||
message: "{{ message }}"
|
message: "{{ message }}"
|
||||||
target: states(sensor.user1_phone_number)
|
target: "{{ states('sensor.user1_phone_number') }}"
|
||||||
mode: single
|
mode: single
|
||||||
icon: mdi:chat-alert
|
icon: mdi:chat-alert
|
||||||
```
|
```
|
||||||
@ -95,42 +96,20 @@ notify_sms_user1:
|
|||||||
{% raw %}
|
{% raw %}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- id: 'forward_sms'
|
- alias: "Forward SMS"
|
||||||
alias: Forward SMS
|
|
||||||
description: ''
|
|
||||||
trigger:
|
trigger:
|
||||||
- platform: event
|
- platform: event
|
||||||
event_type: sms.incoming_sms
|
event_type: sms.incoming_sms
|
||||||
condition: []
|
|
||||||
action:
|
action:
|
||||||
- service: script.notify_sms_user1
|
- service: script.notify_sms_user1
|
||||||
data:
|
data:
|
||||||
message: 'From: {{trigger.event.data.phone}}
|
message: |
|
||||||
{{trigger.event.data.text}}
|
From: {{trigger.event.data.phone}}
|
||||||
'
|
{{trigger.event.data.text}} mode: single
|
||||||
mode: single
|
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
## Notes about the operating system
|
|
||||||
|
|
||||||
If the integration is used with the Home Assistant Operating System, then version [3.6](https://github.com/home-assistant/hassos/releases/tag/3.6) or higher is required.
|
|
||||||
|
|
||||||
For installations not running on Home Assistant or Home Assistant Core using Docker, you must install `gammu-dev` package:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo apt-get install libgammu-dev
|
|
||||||
```
|
|
||||||
|
|
||||||
Before running for the first time, check that the system recognizes the modem by running:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
ls -l /dev/*USB*
|
|
||||||
```
|
|
||||||
|
|
||||||
Note: When running Home Assistant, you need to install the SSH add-on.
|
|
||||||
|
|
||||||
## Required Hardware
|
## Required Hardware
|
||||||
|
|
||||||
You will need a USB GSM stick modem or device like SIM800L v2 connected via USB UART.
|
You will need a USB GSM stick modem or device like SIM800L v2 connected via USB UART.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user