chore: use virtual button to trigger chime
This commit is contained in:
parent
bfec9b1a73
commit
e6c6d165b0
1 changed files with 12 additions and 4 deletions
|
@ -9,7 +9,6 @@ esp32:
|
|||
# Enable Home Assistant API
|
||||
api:
|
||||
web_server:
|
||||
logger:
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
|
@ -38,15 +37,24 @@ binary_sensor:
|
|||
green: 1
|
||||
blue: 0.7
|
||||
effect: pulse
|
||||
- switch.turn_on: relay_chime
|
||||
- delay: 0.1s
|
||||
- switch.turn_off: relay_chime
|
||||
- button.press: chime_button
|
||||
on_release:
|
||||
then:
|
||||
- light.turn_off:
|
||||
id: ring
|
||||
transition_length: 1s
|
||||
|
||||
button:
|
||||
- platform: template
|
||||
id: chime_button
|
||||
name: Ring
|
||||
icon: mdi:bell
|
||||
on_press:
|
||||
then:
|
||||
- switch.turn_on: relay_chime
|
||||
- delay: 0.1s
|
||||
- switch.turn_off: relay_chime
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
pin: GPIO2
|
||||
|
|
Loading…
Add table
Reference in a new issue