-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathexample_mod_ec.yaml
71 lines (63 loc) · 1.4 KB
/
example_mod_ec.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
substitutions:
friendly_name: Microfire Mod-EC
device_name: microfire-mod-ec
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 mod-ec component
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_ec
id: ec
name: EC
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: factory_reset
name: Restart with Factory Default Settings