fix: doorbell muting
This commit is contained in:
parent
cf00ce2272
commit
b26d01d387
1 changed files with 10 additions and 10 deletions
|
@ -37,8 +37,6 @@ switch:
|
|||
id: relay
|
||||
internal: True
|
||||
pin: GPIO12
|
||||
- platform: restart
|
||||
name: Restart
|
||||
- platform: template
|
||||
id: chime_active
|
||||
name: Chime Active
|
||||
|
@ -73,11 +71,7 @@ binary_sensor:
|
|||
green: 1
|
||||
blue: 0.7
|
||||
effect: pulse
|
||||
- if:
|
||||
condition:
|
||||
- switch.is_on: chime_active
|
||||
then:
|
||||
- button.press: chime_button
|
||||
- button.press: chime_button
|
||||
on_release:
|
||||
then:
|
||||
- light.turn_off:
|
||||
|
@ -93,9 +87,15 @@ button:
|
|||
icon: mdi:bell
|
||||
on_press:
|
||||
then:
|
||||
- switch.turn_on: relay
|
||||
- delay: 0.3s
|
||||
- switch.turn_off: relay
|
||||
- if:
|
||||
condition:
|
||||
- switch.is_on: chime_active
|
||||
then:
|
||||
- switch.turn_on: relay
|
||||
- delay: 0.3s
|
||||
- switch.turn_off: relay
|
||||
- platform: restart
|
||||
name: Restart
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
|
|
Loading…
Add table
Reference in a new issue