forked from misperry/WemosD1_Irrigation_System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sprinkler_control.yaml
93 lines (77 loc) · 1.45 KB
/
Sprinkler_control.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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
esphome:
name: irrigation-system
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "passwordhere"
wifi:
ssid: ""
password: ""
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "ssidhere"
password: "passwordhere"
captive_portal:
switch:
- platform: gpio
name: "Zone 1"
id: relay_1
pin: 18
inverted: true
- platform: gpio
name: "Zone 2"
id: relay_2
pin: 19
inverted: true
- platform: gpio
name: "Zone 3"
id: relay_3
pin: 21
inverted: true
- platform: gpio
name: "Zone 4"
id: relay_4
pin: 22
inverted: true
- platform: gpio
name: "Zone 5"
id: relay_5
pin: 23
inverted: true
- platform: gpio
name: "Zone 6"
id: relay_6
pin: 25
inverted: true
- platform: gpio
name: "Zone 7"
id: relay_7
pin: 26
inverted: true
- platform: gpio
name: "Zone 8"
id: relay_8
pin: 27
inverted: true
interval:
- interval: 15s
then:
- if:
condition:
wifi.connected:
then:
else:
- switch.turn_off: relay_1
- switch.turn_off: relay_2
- switch.turn_off: relay_3
- switch.turn_off: relay_4
- switch.turn_off: relay_5
- switch.turn_off: relay_6
- switch.turn_off: relay_7
- switch.turn_off: relay_8