generated from esphome/esphome-project-template
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsonoff-th16-si7021.yaml
80 lines (79 loc) · 1.74 KB
/
sonoff-th16-si7021.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
substitutions:
name: sonoff-th16-si7021
friendly_name: Sonoff TH16
esphome:
name: $name
comment: Sonoff TH16
name_add_mac_suffix: true
# This will allow for (future) project identification,
# configuration and updates.
project:
name: cpyarger.sonoff-th16-si7021
version: "1.1"
esp8266:
board: esp01_1m
dashboard_import:
package_import_url: github://cpyarger/esphome-templates/sonoff-th16-si7021.yaml@main
wifi:
# Set up a wifi access point
ap:
password: "12345678"
# Sets up the improv via serial client for Wi-Fi provisioning
improv_serial:
captive_portal:
web_server:
port: 80
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
status_led:
pin:
number: GPIO13
inverted: True
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
name: "Button"
on_press:
then:
- light.toggle: this_light
- platform: status
name: "${friendly_name} Status"
output:
- platform: gpio
id: output_1
pin: GPIO12
light:
- platform: binary
output: output_1
name: "${friendly_name} Light"
id: this_light
sensor:
- platform: dht
model: Si7021
pin: GPIO14
update_interval: 60s
temperature:
name: "$friendly_name Temperature"
# used to set automatic on/off of based on the temperature in C
#on_value_range:
# - above: 26.0
# then:
# - output.turn_on: output_1
# - below: 21.2
# then:
# - output.turn_off: output_1
humidity:
name: "$friendly_name Humidity"
#on_value_range:
# - above: 80.0
# then:
# - output.turn_on: output_1
# - below: 80.0
# then:
# - output.turn_off: output_1