Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Aug 12, 2024
1 parent 892ee0b commit 4cfafe1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/automation/ring-to-open.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ring to open
# Ring to open <Badge type="warning" text="Party Mode" />

The [Stock Doorman Firmware](../firmware/stock-firmware.md) includes a `Ring to open` automation also known as `Party Mode`.
The [Stock Doorman Firmware](../firmware/stock-firmware.md) includes a `Ring to open` automation.

### What does it do?
As the name already says, the entrance door will be opened as soon as someone rings the entrance doorbell.
Expand Down
26 changes: 26 additions & 0 deletions firmware/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ globals:
restore_value: true
initial_value: '0x3000'

- id: ring_to_open_command
type: int
restore_value: true
initial_value: '0x00000000'

# Board Setup
esp32:
board: esp32-s3-devkitc-1
Expand Down Expand Up @@ -346,6 +351,14 @@ binary_sensor:
input: true
inverted: true

# Ring to open - toggle switch automation
- platform: tcs_intercom
id: ring_to_open_toggle_command
internal: true
lambda: !lambda "return id(ring_to_open_command);"
on_press:
- switch.toggle: doorman_ring_to_open

number:
- platform: template
name: Ring to open delay
Expand Down Expand Up @@ -437,6 +450,19 @@ text:
entity_category: CONFIG
icon: "mdi:console-network"

- platform: template
name: Toggle Ring to open Command
optimistic: true
mode: text
initial_value: '00000000'
on_value:
then:
- lambda: |-
id(ring_to_open_command) = std::stoi(x.c_str(), nullptr, 16);
disabled_by_default: true
entity_category: CONFIG
icon: "mdi:console-network"

event:
- platform: template
id: doorbell_pattern
Expand Down

0 comments on commit 4cfafe1

Please sign in to comment.