Apply feedback from previous SMS doc update (#23864)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Oscar Calvo 2022-08-25 16:36:04 -06:00 committed by GitHub
parent 430c79ccad
commit 4c6624a761
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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`:
#### Define a sensor in `configuration.yaml` to protect user phone number
```yaml
template:
- sensor:
@ -74,16 +75,16 @@ template:
```yaml
notify_sms_user1:
alias: Notify via SMS to User1
alias: "Notify via SMS to User1"
fields:
message:
description: The message content
example: The light is on!
description: "The message content"
example: "The light is on!"
sequence:
- service: notify.sms
data:
message: "{{ message }}"
target: states(sensor.user1_phone_number)
target: "{{ states('sensor.user1_phone_number') }}"
mode: single
icon: mdi:chat-alert
```
@ -95,42 +96,20 @@ notify_sms_user1:
{% raw %}
```yaml
- id: 'forward_sms'
alias: Forward SMS
description: ''
- alias: "Forward SMS"
trigger:
- platform: event
event_type: sms.incoming_sms
condition: []
action:
- service: script.notify_sms_user1
data:
message: 'From: {{trigger.event.data.phone}}
{{trigger.event.data.text}}
'
mode: single
message: |
From: {{trigger.event.data.phone}}
{{trigger.event.data.text}} mode: single
```
{% 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
You will need a USB GSM stick modem or device like SIM800L v2 connected via USB UART.