mirror of
https://github.com/Anonym-tsk/smart-domofon.git
synced 2025-12-08 04:27:07 +03:00
Fix button
This commit is contained in:
@@ -147,6 +147,14 @@ script:
|
|||||||
then:
|
then:
|
||||||
- logger.log: "Set state 'Incoming call'"
|
- logger.log: "Set state 'Incoming call'"
|
||||||
- script.execute: led_off
|
- script.execute: led_off
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
and:
|
||||||
|
- switch.is_off: auto_open
|
||||||
|
- switch.is_off: auto_open_once
|
||||||
|
- switch.is_off: auto_reject
|
||||||
|
then:
|
||||||
|
script.execute: led_blink_red_1_on
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
switch.is_on: auto_reject
|
switch.is_on: auto_reject
|
||||||
@@ -164,14 +172,6 @@ script:
|
|||||||
- script.execute: call_accept
|
- script.execute: call_accept
|
||||||
- delay: 1s
|
- delay: 1s
|
||||||
- switch.turn_off: auto_open_once
|
- switch.turn_off: auto_open_once
|
||||||
- if:
|
|
||||||
condition:
|
|
||||||
and:
|
|
||||||
- switch.is_off: auto_open
|
|
||||||
- switch.is_off: auto_open_once
|
|
||||||
- switch.is_off: auto_reject
|
|
||||||
then:
|
|
||||||
script.execute: led_blink_red_1_on
|
|
||||||
|
|
||||||
# Permanent blink green led with one flash
|
# Permanent blink green led with one flash
|
||||||
- id: led_blink_green_1_on
|
- id: led_blink_green_1_on
|
||||||
@@ -400,28 +400,18 @@ binary_sensor:
|
|||||||
then:
|
then:
|
||||||
script.execute: call_accept
|
script.execute: call_accept
|
||||||
else:
|
else:
|
||||||
- if:
|
if:
|
||||||
condition:
|
|
||||||
and:
|
|
||||||
- switch.is_off: auto_open
|
|
||||||
- switch.is_off: auto_open_once
|
|
||||||
- switch.is_off: auto_reject
|
|
||||||
then:
|
|
||||||
switch.turn_on: auto_open_once
|
|
||||||
- if:
|
|
||||||
condition:
|
condition:
|
||||||
switch.is_on: auto_open_once
|
switch.is_on: auto_open_once
|
||||||
then:
|
then:
|
||||||
switch.turn_on: auto_open
|
switch.turn_on: auto_open
|
||||||
- if:
|
else:
|
||||||
|
if:
|
||||||
condition:
|
condition:
|
||||||
switch.is_on: auto_open
|
switch.is_on: auto_open
|
||||||
then:
|
then:
|
||||||
switch.turn_on: auto_reject
|
switch.turn_on: auto_reject
|
||||||
- if:
|
else:
|
||||||
condition:
|
|
||||||
switch.is_on: auto_reject
|
|
||||||
then:
|
|
||||||
switch.turn_on: auto_open_once
|
switch.turn_on: auto_open_once
|
||||||
# Long click - disable auto opening
|
# Long click - disable auto opening
|
||||||
- timing:
|
- timing:
|
||||||
|
|||||||
Reference in New Issue
Block a user