diff --git a/components/sim800l.rst b/components/sim800l.rst index ed208dab01..d0ed61acac 100644 --- a/components/sim800l.rst +++ b/components/sim800l.rst @@ -2,11 +2,11 @@ Sim800L Component ================= .. seo:: - :description: Instructions for setting up the SIM800L GSM module to send and receive SMS in ESPHome. + :description: Instructions for setting up the SIM800L GSM module to dial, send and receive SMS in ESPHome. :image: sim800l.jpg :keywords: SMS SIM800L GSM -The ``SIM800L`` Component provides the ability to send and receive SMS text messages. The device must be +The ``SIM800L`` Component provides the ability to dial, send and receive SMS text messages. The device must be connected via a :doc:`UART bus ` supporting both receiving and transmitting line. The UART bus must be configured at the same speed of the module which is by default 9600bps. The required connection wires are ``+VCC``, ``GND``, ``RX`` and ``TX``. @@ -92,6 +92,27 @@ Send a SMS message to a phone recipient using this action in automations. message: !lambda |- return id(reed_switch).state ? "Door is now OPEN" : "Hey door just CLOSED"; + +.. _sim800l-dial_action: + +``sim800l.dial`` Action +--------------------------- + +Dial to a phone recipient using this action in automations. + +.. code-block:: yaml + + on_...: + then: + - sim800l.dial: + recipient: '+15551234567' + + # Templated: + - sim800l.dial: + recipient: !lambda |- + if (id(reed_switch).state) return "+15551234567"; + else return "15551234568"; + Configuration options: - **recipient** (***Required**, string, :ref:`templatable `): The message recipient. @@ -112,7 +133,7 @@ Getting started with Home Assistant ----------------------------------- The following code will get you up and running with a configuration updating received messages -on Home Assistant and will also setup a service so you can send messages with your SIM800L. +on Home Assistant and will also setup a service so you can send messages and dial with your SIM800L. .. code-block:: yaml @@ -126,6 +147,12 @@ on Home Assistant and will also setup a service so you can send messages with yo - sim800l.send_sms: recipient: !lambda 'return recipient;' message: !lambda 'return message;' + - service: dial + variables: + recipient: string + then: + - sim800l.dial: + recipient: !lambda 'return recipient;' text_sensor: - platform: template @@ -159,6 +186,9 @@ To trigger the automation from Home Assistant you can invoke the service with th data: recipient: "+15551234567" message: "Hello World!" + - service: esphome.livingroom_dial + data: + recipient: "+15551234567" Relay management commands received from an authorized sender: