-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathexample_ec_ph_ntc.yaml
119 lines (105 loc) · 2.43 KB
/
example_ec_ph_ntc.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
substitutions:
friendly_name: Microfire pH+EC+Temp
device_name: microfire-ph-ec-temp
esphome:
name: $device_name
esp32:
board: esp32dev
framework:
type: arduino
logger:
api:
ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: $device_name
password: !secret wifi_failover
captive_portal:
# import the components
external_components:
- source:
type: git
url: https://github.com/u-fire/ESPHomeComponents/
# https://esphome.io/components/i2c.html
i2c:
sda: 21
scl: 22
sensor:
- platform: mod_ntc
id: water_temp
name: Temperature
on_value:
then:
- component.update: ec
- component.update: ph
- platform: mod_ec
id: ec
update_interval: never
name: EC
temperature_sensor: water_temp
- platform: mod_ph
id: ph
update_interval: never
name: pH
temperature_sensor: water_temp
button:
- platform: template
id: ec_calibrate_low
name: EC Calibrate Low 0.1
icon: mdi:format-vertical-align-bottom
on_press:
lambda: |-
id(ec).calibrateLow(0.1);
- platform: template
id: ec_calibrate_mid
name: EC Calibrate Mid 1.0
icon: mdi:format-vertical-align-center
on_press:
lambda: |-
id(ec).calibrateMid(1.0);
- platform: template
id: ec_calibrate_high
name: EC Calibrate High 10.0
icon: mdi:format-vertical-align-top
on_press:
lambda: |-
id(ec).calibrateHigh(10.0);
- platform: template
id: ec_calibrate_reset
name: EC Calibrate Reset
icon: mdi:restore
on_press:
lambda: |-
id(ec).calibrateReset();
- platform: template
id: ph_calibrate_low
name: pH Calibrate Low 4.0
icon: mdi:format-vertical-align-bottom
on_press:
lambda: |-
id(ph).calibrateLow(4.0);
- platform: template
id: ph_calibrate_mid
name: pH Calibrate Mid 7.0
icon: mdi:format-vertical-align-center
on_press:
lambda: |-
id(ph).calibrateMid(7.0);
- platform: template
id: ph_calibrate_high
name: pH Calibrate High 10.0
icon: mdi:format-vertical-align-top
on_press:
lambda: |-
id(ph).calibrateHigh(10.0);
- platform: template
id: ph_calibrate_reset
name: pH Calibrate Reset
icon: mdi:restore
on_press:
lambda: |-
id(ph).calibrateReset();
- platform: factory_reset
name: Restart with Factory Default Settings