feat: add doorbell config
This commit is contained in:
parent
24c89f3190
commit
836c2e20a4
1 changed files with 76 additions and 0 deletions
76
doorbell.yaml
Normal file
76
doorbell.yaml
Normal file
|
@ -0,0 +1,76 @@
|
|||
esphome:
|
||||
name: swablab-doorbell
|
||||
friendly_name: Swablab Doorbell
|
||||
name_add_mac_suffix: True
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
password: !secret ota_password
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: button
|
||||
pin:
|
||||
number: 16
|
||||
mode:
|
||||
input: True
|
||||
pulldown: True
|
||||
filters:
|
||||
- delayed_on: 10ms
|
||||
- delayed_off: 10ms
|
||||
on_press:
|
||||
then:
|
||||
- light.turn_on:
|
||||
id: ring
|
||||
red: 0
|
||||
green: 0.5
|
||||
blue: 1
|
||||
effect: pulse
|
||||
- delay: 4s
|
||||
- light.turn_off: ring
|
||||
- light.turn_on:
|
||||
id: ring
|
||||
red: 1
|
||||
green: 0
|
||||
blue: 0
|
||||
- delay: 1s
|
||||
- light.turn_off: ring
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
pin: 15
|
||||
id: led_red
|
||||
- platform: ledc
|
||||
pin: 2
|
||||
id: led_green
|
||||
- platform: ledc
|
||||
pin: 4
|
||||
id: led_blue
|
||||
- platform: gpio
|
||||
pin: 17
|
||||
id: relay_door
|
||||
|
||||
light:
|
||||
- platform: rgb
|
||||
id: ring
|
||||
blue: led_blue
|
||||
green: led_green
|
||||
red: led_red
|
||||
effects:
|
||||
- pulse:
|
||||
transition_length: 250ms
|
||||
update_interval: 500ms
|
||||
min_brightness: 10%
|
||||
max_brightness: 100%
|
||||
default_transition_length:
|
||||
milliseconds: 100
|
Loading…
Add table
Reference in a new issue