This commit is contained in:
Nikolay Vasilchuk
2019-10-31 11:13:37 +03:00
parent 99061f536b
commit f7e5fb023f

View File

@@ -126,7 +126,7 @@ script:
condition: condition:
switch.is_on: auto_open switch.is_on: auto_open
then: then:
script.execute: led_blink_green_2_on script.execute: led_green_on_soft
- if: - if:
condition: condition:
switch.is_on: auto_reject switch.is_on: auto_reject
@@ -176,14 +176,7 @@ script:
then: then:
light.turn_on: light.turn_on:
id: rgb_led id: rgb_led
effect: "Blink Green Once" effect: "Blink Green"
# Permanent blink green led with two flashes
- id: led_blink_green_2_on
then:
light.turn_on:
id: rgb_led
effect: "Blink Green Twice"
# Once blink green led with one flash # Once blink green led with one flash
- id: led_blink_green_1_once - id: led_blink_green_1_once
@@ -198,6 +191,17 @@ script:
- delay: 200ms - delay: 200ms
- script.execute: led_off - 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 # Permanent blink red led with one flash
- id: led_blink_red_1_on - id: led_blink_red_1_on
then: then:
@@ -278,7 +282,7 @@ light:
blue: led_blue blue: led_blue
effects: effects:
- automation: - automation:
name: "Blink Green Once" name: "Blink Green"
sequence: sequence:
- light.turn_on: - light.turn_on:
id: rgb_led id: rgb_led
@@ -296,41 +300,6 @@ light:
blue: 0% blue: 0%
transition_length: 100ms transition_length: 100ms
- delay: 3000ms - 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: - automation:
name: "Blink Red" name: "Blink Red"
sequence: sequence:
@@ -429,13 +398,29 @@ binary_sensor:
then: then:
script.execute: call_accept script.execute: call_accept
else: else:
if: - if:
condition: condition:
switch.is_on: auto_open_once and:
then: - switch.is_off: auto_open
switch.turn_on: auto_open - switch.is_off: auto_open_once
else: - switch.is_off: auto_reject
switch.turn_on: auto_open_once 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 # Long click - disable auto opening
- timing: - timing:
- ON for at least $short_click_time_to - ON for at least $short_click_time_to
@@ -448,4 +433,5 @@ binary_sensor:
else: else:
- switch.turn_off: auto_open - switch.turn_off: auto_open
- switch.turn_off: auto_open_once - switch.turn_off: auto_open_once
- switch.turn_off: auto_reject
- script.execute: led_blink_green_1_once - script.execute: led_blink_green_1_once