-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirmware.yaml
More file actions
80 lines (73 loc) · 1.55 KB
/
firmware.yaml
File metadata and controls
80 lines (73 loc) · 1.55 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
esphome:
name: "sebaschan"
platform: ESP8266
board: nodemcuv2
on_boot:
# Indicating boot with that.
- delay: 0.1s
- switch.turn_on: t_pickup
- delay: 0.1s
- switch.turn_off: t_pickup
- delay: 0.1s
- switch.turn_on: t_pickup
- delay: 0.1s
- switch.turn_off: t_pickup
api: !secret api
ota: !secret ota
wifi: !secret wifi
logger:
switch:
- platform: gpio
pin:
number: D3
mode: OUTPUT_OPEN_DRAIN
inverted: true
id: ring_one
restore_mode: ALWAYS_OFF
- platform: gpio
pin: D5
id: counter_up
restore_mode: ALWAYS_OFF
- platform: gpio
pin:
number: GPIO12
mode: OUTPUT_OPEN_DRAIN
inverted: true
id: pickup
restore_mode: ALWAYS_OFF
- platform: template
name: "Pick up phone"
id: t_pickup
lambda: |-
return !digitalRead(12);
turn_on_action:
- switch.turn_on: pickup
turn_off_action:
- switch.turn_off: pickup
- platform: template
name: "Open Ring One Door"
id: t_ring_one
lambda: |-
return !digitalRead(D3);
turn_on_action:
- switch.turn_on: counter_up
- switch.turn_on: ring_one
- delay: 0.05s
- switch.turn_off: counter_up
turn_off_action:
- switch.turn_off: ring_one
binary_sensor:
- platform: gpio
pin:
number: GPIO4
inverted: True
filters:
- delayed_on: 1ms
- delayed_off: 2s
name: "Call ring"
on_press:
then:
- delay: 2s
- switch.turn_on: t_pickup
- delay: 2s
- switch.turn_off: t_pickup