From 4a1d42ca59e342191ee8cea7b55fb8aeecafd5d2 Mon Sep 17 00:00:00 2001 From: SteeledKnight <121769190+SteeledKnight@users.noreply.github.com> Date: Sat, 6 Jan 2024 22:56:30 -0500 Subject: [PATCH 1/2] Add door-open-chime.yaml Add a package that creates a virtual button that on press pulses on the selected output (usually connected to a piezo buzzer). This would typically be used as a chime to alert when a door has been opened. --- packages/door-open-chime.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 packages/door-open-chime.yaml diff --git a/packages/door-open-chime.yaml b/packages/door-open-chime.yaml new file mode 100644 index 0000000..c065482 --- /dev/null +++ b/packages/door-open-chime.yaml @@ -0,0 +1,25 @@ +output: + - id: 'chime_pin' + platform: gpio + pin: + number: $warning_beep_pin + allow_other_uses: $warning_beep_shared + + +button: + - platform: template + id: buzzer + name: Buzzer + on_press: + - repeat: + count: $buzzer_repeat + then: + - output.turn_on: chime_pin + - delay: $buzzer_pulse + - output.turn_off: chime_pin + - delay: $buzzer_pause + +substitutions: + buzzer_pulse: 24ms + buzzer_pause: 54ms + buzzer_repeat: "6" \ No newline at end of file From 66516d7dedddf32a38f1c2d5553cbacd53575794 Mon Sep 17 00:00:00 2001 From: SteeledKnight <121769190+SteeledKnight@users.noreply.github.com> Date: Sat, 6 Jan 2024 22:59:13 -0500 Subject: [PATCH 2/2] Add option to enable/disable the shared state of the alarm output Adding a substitution to enable or disable whether the alarm output is shared. See issue #27. Default is set to true to follow the current standard. --- packages/alarm-panel-esp32-base.yaml | 1 + packages/alarm-panel-esp8266-base.yaml | 1 + packages/alarm-panel/alarm.yaml | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/alarm-panel-esp32-base.yaml b/packages/alarm-panel-esp32-base.yaml index bf33a04..e513281 100644 --- a/packages/alarm-panel-esp32-base.yaml +++ b/packages/alarm-panel-esp32-base.yaml @@ -19,6 +19,7 @@ substitutions: warning_beep_pause_time: 130ms warning_beep_internal_only: "false" warning_beep_shared: "false" + alarm_shared: "true" blink_on_state: "true" #### diff --git a/packages/alarm-panel-esp8266-base.yaml b/packages/alarm-panel-esp8266-base.yaml index 58a50e9..d931a07 100644 --- a/packages/alarm-panel-esp8266-base.yaml +++ b/packages/alarm-panel-esp8266-base.yaml @@ -17,6 +17,7 @@ substitutions: warning_beep_pause_time: 130ms warning_beep_internal_only: "false" warning_beep_shared: "true" + alarm_shared: "true" blink_on_state: "true" #### diff --git a/packages/alarm-panel/alarm.yaml b/packages/alarm-panel/alarm.yaml index f6710cb..f44bef8 100644 --- a/packages/alarm-panel/alarm.yaml +++ b/packages/alarm-panel/alarm.yaml @@ -4,7 +4,7 @@ switch: name: Siren pin: number: $alarm - allow_other_uses: true + allow_other_uses: $alarm_shared platform: gpio icon: mdi:bullhorn