69 lines
1.2 KiB
YAML
69 lines
1.2 KiB
YAML
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: 5s
|
|
- 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
|