Skip to content

Commit

Permalink
Change Switch to Select
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Feb 9, 2025
1 parent 8ab5f95 commit 4ff78dd
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 29 deletions.
4 changes: 2 additions & 2 deletions docs/de/guide/automation/ring-to-open.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ Du kannst entscheiden welche Außenstelle (Tür) die Automation auslöst.
Du kannst entscheiden ob die Status LED blinkt während die Automation aktiv ist.
:::

::: info Toggle with function button
Du kannst entscheiden ob die Automation von der Funktionstaste umgeschaltet wird.
::: info Toggle Trigger
Du kannst entscheiden durch was die Automation umgeschaltet wird.
:::
11 changes: 7 additions & 4 deletions docs/de/reference/entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ Steuert die Einschaltbestätigung für die [Ring To Open](../guide/automation/ri
### Ring To Open: Display Status <Badge type="tip" text="doorman_ring_to_open_led_status" /> <Badge type="info" text="Deaktiviert" />
Steuert die Status LED anzeige für die [Ring To Open](../guide/automation/ring-to-open) Automatisierung.

### Ring To Open: Toggle with function button <Badge type="tip" text="doorman_ring_to_open_use_function_button" /> <Badge type="info" text="Deaktiviert" />
Legt fest ob die [Ring To Open](../guide/automation/ring-to-open) Automatisierung von der Funktionstaste umgeschaltet wird.


### Relay <Badge type="tip" text="doorman_relay" /> <Badge type="info" text="Deaktiviert" />
Steuert das eingebaute Relais.

Expand Down Expand Up @@ -233,6 +229,13 @@ Legt die auslösende Außenstelle für die [Ring To Open](../guide/automation/ri
- Second Entrance
- Any

### Ring To Open: Toggle Trigger <Badge type="tip" text="doorman_ring_to_open_toggle_trigger" /> <Badge type="info" text="Deaktiviert" />
Legt den auslöser zum umschalten für die [Ring To Open](../guide/automation/ring-to-open) automation fest.

##### Optionen:
- Manual
- Function Button

### Intercom Model <Badge type="tip" text="intercom_model" /> <Badge type="info" text="Deaktiviert" />
Legt das Modell deiner Innenstation fest. Finde mehr über die [unterstützten Modelle und Einstellungen](esphome-component#model-setting-availability) heraus.

Expand Down
8 changes: 4 additions & 4 deletions docs/en/changelog/firmware.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Welcome to the latest updates! Here's a breakdown of all the **new features**, *
- **Fix Update Process**
Firmware updates are now correctly identified and retrieved for each specific firmware variant.

- **Ring to Open Function Button Toggle**
You can now choose whether the `Function Button` will toggle the Ring To Open automation as some models use the button for specific purposes.
- **Ring to Open Toggle Trigger**
You can now choose which trigger will toggle the Ring To Open automation as some models use the button for specific purposes.

### 📝 Other Updates
- **Nuki Component**
Expand All @@ -17,8 +17,8 @@ Welcome to the latest updates! Here's a breakdown of all the **new features**, *
The configuration files have been reorganized to enhance modularity and enable support for additional host platforms in the future.

### 🚨 Breaking Changes
- **Ring to Open Function Button Toggle**
The new function button toggle is turned off by default. You'll need to enable it to restore the previous behavior.
- **Ring to Open Toggle Trigger**
The new option is set to `Manual` by default. You'll need to set it to `Function Button` to restore the previous behavior.

## 2025.2.0
### 🚀 What's New?
Expand Down
6 changes: 3 additions & 3 deletions docs/en/guide/automation/ring-to-open.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ You can choose to disable the Ring To Open automation after 5 to 60 minutes, aft
You can choose which door station will trigger the automation.
:::

::: info Display Status
::: info Display Status
You can choose whether the status LED blinks while the automation is active.
:::

::: info Toggle with function button
You can decide whether the automation is toggled by the function button.
::: info Toggle Trigger
You can decide which trigger will toggle the automation.
:::
10 changes: 7 additions & 3 deletions docs/en/reference/entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,6 @@ Controls the turn-on confirmation for the [Ring To Open](../guide/automation/rin
### Ring To Open: Display Status <Badge type="tip" text="doorman_ring_to_open_led_status" /> <Badge type="info" text="Disabled by default" />
Controls the Status LED for the [Ring To Open](../guide/automation/ring-to-open) automation.

### Ring To Open: Toggle with function button <Badge type="tip" text="doorman_ring_to_open_use_function_button" /> <Badge type="info" text="Disabled by default" />
Defines whether the function button will toggle the [Ring To Open](../guide/automation/ring-to-open) automation.

### Relay <Badge type="tip" text="doorman_relay" /> <Badge type="info" text="Disabled by default" />
Controls the built-in relay.

Expand Down Expand Up @@ -231,6 +228,13 @@ Sets the triggering door for the [Ring To Open](../guide/automation/ring-to-open
- Second Entrance
- Any

### Ring To Open: Toggle Trigger <Badge type="tip" text="doorman_ring_to_open_toggle_trigger" /> <Badge type="info" text="Disabled by default" />
Defines the trigger to toggle the [Ring To Open](../guide/automation/ring-to-open) automation.

##### Options:
- Manual
- Function Button

### Intercom Model <Badge type="tip" text="intercom_model" /> <Badge type="info" text="Disabled by default" />
Sets the intercom phone model. Check the [Supported Models and Settings](esphome-component#model-setting-availability) to see your options.

Expand Down
28 changes: 15 additions & 13 deletions firmware/addons/ring-to-open.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ binary_sensor:
on_press:
- if:
condition:
- switch.is_on: doorman_ring_to_open_use_function_button
- lambda: !lambda 'return id(doorman_ring_to_open_toggle_trigger).state != "Function Button";'
then:
- switch.toggle: doorman_ring_to_open
- delay: 300ms
Expand Down Expand Up @@ -139,18 +139,6 @@ switch:
web_server:
sorting_group_id: sorting_group_doorman_settings

- platform: template
id: doorman_ring_to_open_use_function_button
name: "Ring To Open: Toggle with function button"
icon: "mdi:circle-outline"
restore_mode: RESTORE_DEFAULT_OFF
optimistic: true
entity_category: CONFIG
disabled_by_default: true
web_server:
sorting_group_id: sorting_group_doorman_settings


select:
- platform: template
id: doorman_ring_to_open_timeout_mode
Expand Down Expand Up @@ -191,6 +179,20 @@ select:
web_server:
sorting_group_id: sorting_group_doorman_settings

- platform: template
id: doorman_ring_to_open_toggle_trigger
name: "Ring To Open: Toggle Trigger"
icon: "mdi:circle-outline"
optimistic: true
options:
- Manual
- Function Button
initial_option: Manual
restore_value: true
entity_category: CONFIG
disabled_by_default: true
web_server:
sorting_group_id: sorting_group_doorman_settings

script:
- id: ring_to_open_timer
Expand Down

0 comments on commit 4ff78dd

Please sign in to comment.