mirror of
https://github.com/Anonym-tsk/smart-domofon.git
synced 2025-12-06 03:26:58 +03:00
Button
This commit is contained in:
@@ -126,7 +126,7 @@ script:
|
||||
condition:
|
||||
switch.is_on: auto_open
|
||||
then:
|
||||
script.execute: led_blink_green_2_on
|
||||
script.execute: led_green_on_soft
|
||||
- if:
|
||||
condition:
|
||||
switch.is_on: auto_reject
|
||||
@@ -176,14 +176,7 @@ script:
|
||||
then:
|
||||
light.turn_on:
|
||||
id: rgb_led
|
||||
effect: "Blink Green Once"
|
||||
|
||||
# Permanent blink green led with two flashes
|
||||
- id: led_blink_green_2_on
|
||||
then:
|
||||
light.turn_on:
|
||||
id: rgb_led
|
||||
effect: "Blink Green Twice"
|
||||
effect: "Blink Green"
|
||||
|
||||
# Once blink green led with one flash
|
||||
- id: led_blink_green_1_once
|
||||
@@ -198,6 +191,17 @@ script:
|
||||
- delay: 200ms
|
||||
- script.execute: led_off
|
||||
|
||||
# Permanent on green led with soft brightness
|
||||
- id: led_green_on_soft
|
||||
then:
|
||||
light.turn_on:
|
||||
id: rgb_led
|
||||
brightness: 40%
|
||||
red: 0%
|
||||
green: 40%
|
||||
blue: 0%
|
||||
transition_length: 100ms
|
||||
|
||||
# Permanent blink red led with one flash
|
||||
- id: led_blink_red_1_on
|
||||
then:
|
||||
@@ -278,7 +282,7 @@ light:
|
||||
blue: led_blue
|
||||
effects:
|
||||
- automation:
|
||||
name: "Blink Green Once"
|
||||
name: "Blink Green"
|
||||
sequence:
|
||||
- light.turn_on:
|
||||
id: rgb_led
|
||||
@@ -296,41 +300,6 @@ light:
|
||||
blue: 0%
|
||||
transition_length: 100ms
|
||||
- delay: 3000ms
|
||||
- automation:
|
||||
name: "Blink Green Twice"
|
||||
sequence:
|
||||
- light.turn_on:
|
||||
id: rgb_led
|
||||
brightness: 100%
|
||||
red: 0%
|
||||
green: 100%
|
||||
blue: 0%
|
||||
transition_length: 100ms
|
||||
- delay: 200ms
|
||||
- light.turn_on:
|
||||
id: rgb_led
|
||||
brightness: 1%
|
||||
red: 0%
|
||||
green: 100%
|
||||
blue: 0%
|
||||
transition_length: 100ms
|
||||
- delay: 200ms
|
||||
- light.turn_on:
|
||||
id: rgb_led
|
||||
brightness: 100%
|
||||
red: 0%
|
||||
green: 100%
|
||||
blue: 0%
|
||||
transition_length: 100ms
|
||||
- delay: 200ms
|
||||
- light.turn_on:
|
||||
id: rgb_led
|
||||
brightness: 1%
|
||||
red: 0%
|
||||
green: 100%
|
||||
blue: 0%
|
||||
transition_length: 100ms
|
||||
- delay: 3000ms
|
||||
- automation:
|
||||
name: "Blink Red"
|
||||
sequence:
|
||||
@@ -429,13 +398,29 @@ binary_sensor:
|
||||
then:
|
||||
script.execute: call_accept
|
||||
else:
|
||||
if:
|
||||
condition:
|
||||
switch.is_on: auto_open_once
|
||||
then:
|
||||
switch.turn_on: auto_open
|
||||
else:
|
||||
switch.turn_on: auto_open_once
|
||||
- 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:
|
||||
switch.is_on: auto_open_once
|
||||
then:
|
||||
switch.turn_on: auto_open
|
||||
- if:
|
||||
condition:
|
||||
switch.is_on: auto_open
|
||||
then:
|
||||
switch.turn_on: auto_reject
|
||||
- if:
|
||||
condition:
|
||||
switch.is_on: auto_reject
|
||||
then:
|
||||
switch.turn_on: auto_open_once
|
||||
# Long click - disable auto opening
|
||||
- timing:
|
||||
- ON for at least $short_click_time_to
|
||||
@@ -448,4 +433,5 @@ binary_sensor:
|
||||
else:
|
||||
- switch.turn_off: auto_open
|
||||
- switch.turn_off: auto_open_once
|
||||
- switch.turn_off: auto_reject
|
||||
- script.execute: led_blink_green_1_once
|
||||
|
||||
Reference in New Issue
Block a user