From 8b9d170120a904d08f9b5c2003ce47433954b6ba Mon Sep 17 00:00:00 2001 From: Nikolay Vasilchuk Date: Fri, 12 Feb 2021 22:05:29 +0300 Subject: [PATCH] Accept/Reject call switches --- ge1mer/domofon.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/ge1mer/domofon.yaml b/ge1mer/domofon.yaml index fd7ded3..7a159df 100644 --- a/ge1mer/domofon.yaml +++ b/ge1mer/domofon.yaml @@ -481,6 +481,30 @@ switch: - output.turn_off: relay_mute - script.execute: state_no_call + # Accept call + - platform: template + name: "Domofon accept call" + icon: "mdi:door-open" + lambda: "return false;" + turn_on_action: + if: + condition: + binary_sensor.is_on: incoming_call + then: + script.execute: call_accept + + # Reject call + - platform: template + name: "Domofon reject call" + icon: "mdi:door-closed-lock" + lambda: "return false;" + turn_on_action: + if: + condition: + binary_sensor.is_on: incoming_call + then: + script.execute: call_reject + # RGB Led (not exported to Home Assistant) light: - platform: rgb