feat(doorbell): update pins and toggle chime
This commit is contained in:
parent
4f0e9967a0
commit
2a0ce732dd
1 changed files with 10 additions and 13 deletions
|
@ -8,6 +8,7 @@ esp32:
|
|||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
logger:
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
|
@ -21,7 +22,7 @@ binary_sensor:
|
|||
- platform: gpio
|
||||
id: button
|
||||
pin:
|
||||
number: 15
|
||||
number: GPIO15
|
||||
mode:
|
||||
input: True
|
||||
pulldown: True
|
||||
|
@ -30,27 +31,23 @@ binary_sensor:
|
|||
- delayed_off: 10ms
|
||||
on_press:
|
||||
then:
|
||||
- light.turn_on:
|
||||
id: ring
|
||||
red: 0
|
||||
green: 0.5
|
||||
blue: 1
|
||||
effect: pulse
|
||||
- delay: 5s
|
||||
- light.turn_off: ring
|
||||
- output.turn_on: relay_chime
|
||||
on_release:
|
||||
then:
|
||||
- output.turn_off: relay_chime
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
pin: 2
|
||||
pin: GPIO2
|
||||
id: led_red
|
||||
- platform: ledc
|
||||
pin: 4
|
||||
pin: GPIO4
|
||||
id: led_green
|
||||
- platform: ledc
|
||||
pin: 16
|
||||
pin: GPIO16
|
||||
id: led_blue
|
||||
- platform: gpio
|
||||
pin: 32
|
||||
pin: GPIO12
|
||||
id: relay_chime
|
||||
|
||||
light:
|
||||
|
|
Loading…
Add table
Reference in a new issue