-
Notifications
You must be signed in to change notification settings - Fork 2
/
deurbel.yaml
48 lines (42 loc) · 1.09 KB
/
deurbel.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
esphome:
name: deurbel
platform: ESP8266
board: d1_mini
wifi:
ssid: "<your wifi ssid>"
password: "<secret_password>"
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
switch:
- platform: gpio
name: "Deurbel Relay"
id: relay
internal: true # NO NEED TO SEE IT IN HOMEASSISTANT
icon: mdi:alarm-bell
pin:
number: D1 # D1 IS USED FOR RELAY ON WEMOS D1 RELAY SHIEL
inverted: false
binary_sensor:
- platform: gpio
pin: D2
name: "Deurbel" # DOORBELL BUTTON
#device_class: window
filters:
# - delayed_on: 100ms # THIS DOES THE DEBOUNCE <-- disabled, not needed as delayed_off prevents from...
- delayed_off: 5000ms # THIS PREVENTS FROM MULTIPLE RANGS
on_press:
then:
- if:
condition:
binary_sensor.is_off: mute # IF MUTE DONT RING
then:
- switch.turn_on: relay
- delay: 500ms
- switch.turn_off: relay
- platform: homeassistant
name: "Input Boolean From Home Assistant"
entity_id: input_boolean.mute_doorbell
id: mute