fix: doorbell muting

This commit is contained in:
Mario 2025-06-14 13:34:11 +00:00
parent cf00ce2272
commit b26d01d387

View file

@ -37,8 +37,6 @@ switch:
id: relay id: relay
internal: True internal: True
pin: GPIO12 pin: GPIO12
- platform: restart
name: Restart
- platform: template - platform: template
id: chime_active id: chime_active
name: Chime Active name: Chime Active
@ -73,11 +71,7 @@ binary_sensor:
green: 1 green: 1
blue: 0.7 blue: 0.7
effect: pulse effect: pulse
- if: - button.press: chime_button
condition:
- switch.is_on: chime_active
then:
- button.press: chime_button
on_release: on_release:
then: then:
- light.turn_off: - light.turn_off:
@ -93,9 +87,15 @@ button:
icon: mdi:bell icon: mdi:bell
on_press: on_press:
then: then:
- switch.turn_on: relay - if:
- delay: 0.3s condition:
- switch.turn_off: relay - switch.is_on: chime_active
then:
- switch.turn_on: relay
- delay: 0.3s
- switch.turn_off: relay
- platform: restart
name: Restart
output: output:
- platform: ledc - platform: ledc