-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathLILYGO-T-Higrow-ESP32.yaml
117 lines (99 loc) · 2.69 KB
/
LILYGO-T-Higrow-ESP32.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
---
substitutions:
# Dashes are not supported in devicename
devicename: "lilygohigrowplantsensor"
device_description: "Keep my plants safe and lively"
project_version: "1.1"
update_interval: 30min
loglevel: DEBUG
moisture_min: "2.82"
moisture_max: "1.39"
conductivity_min: "0.075"
conductivity_max: "0.25"
# Uncomment run_duration and sleep_duration if you want to use deepsleep
# set how long to stay awake - NOT less then 10sec
# run_duration: 11s
# set how long to sleep in minutes
# sleep_duration: 60min
esphome:
name: "${devicename}"
comment: "${device_description}"
# Automatically add the mac address to the name
# so you can use a single firmware for all devices
name_add_mac_suffix: true
# This will allow for (future) project identification,
# configuration and updates.
project:
name: esphome.project-template
version: "${project_version}"
on_boot:
priority: 240
then:
- wait_until:
condition:
wifi.connected:
timeout: 10s
on_shutdown:
then:
- switch.turn_off: spower
dashboard_import:
package_import_url: github://bruvv/LILYGO-T-Higrow-Esphome/LILYGO-T-Higrow-ESP32.yaml@main
esp32:
board: lolin_d32
improv_serial:
wifi:
# Use improv (after installing either go to web.esphome.io or use the installer here: https://bruvv.github.io/LILYGO-T-Higrow-Esphome)
# ssid: !secret wifi_ssid
# password: !secret wifi_password
# fast_connect: True
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
captive_portal:
# Web server disabled because it was using to much ram
# web_server:
# port: 80
# Enable logging
logger:
level: "${loglevel}"
api:
ota:
- platform: esphome
time:
- platform: homeassistant
button:
- platform: restart
name: "Restart - ${devicename}"
i2c:
sda: 25
scl: 26
scan: true
id: bus_a
setup_priority: -200
switch:
# Power Switch
- platform: gpio
name: "${devicename} Sensor Power switch"
pin:
number: 4
mode: INPUT_PULLUP
id: spower
restore_mode: ALWAYS_ON
internal: true
setup_priority: 1000
sensor:
# Wifi sensor
- platform: wifi_signal
name: "${devicename} WiFi Signal"
id: "${devicename}_wifi_signal"
update_interval: ${update_interval}
packages:
text_sensors: !include common/text_sensors.yaml
dht: !include common/dht.yaml
plantsensors: !include common/plantsensors.yaml
waterpump: !include common/waterpump.yaml
bluetooth: !include common/bluetooth.yaml
# Battery only works for 12 hours with deepsleep!
# bme280: !include common/bme280.yaml
# deepsleep: !include common/deepsleep.yaml
# battery: !include common/battery.yaml