From b5e9683e039e80c869f155b5dd6f9aa954069aa3 Mon Sep 17 00:00:00 2001 From: tyomikh <44292116+tyomikh@users.noreply.github.com> Date: Mon, 21 Dec 2020 02:36:09 +0300 Subject: [PATCH] Update sim800l.rst (#893) --- components/sim800l.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/components/sim800l.rst b/components/sim800l.rst index fdb43c6bc..ed208dab0 100644 --- a/components/sim800l.rst +++ b/components/sim800l.rst @@ -160,6 +160,23 @@ To trigger the automation from Home Assistant you can invoke the service with th recipient: "+15551234567" message: "Hello World!" + +Relay management commands received from an authorized sender: + +.. code-block:: yaml + + sim800l: + on_sms_received: + - lambda: |- + if ( (id(sms_sender).state == "+79991234567") && ( (id(sms_message).state == "relay_1_on") OR (id(sms_message).state == "Relay_1_on") ) ) { + id(relay_1).turn_on(); + } + switch: + - platform: gpio + id: relay_1 + pin: 0 + + See Also --------