-
Notifications
You must be signed in to change notification settings - Fork 0
/
s20switch_th.yaml
73 lines (64 loc) · 1.43 KB
/
s20switch_th.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
substitutions:
device_name: "s20th"
friendly_name: "Garage"
sonoff_type: "TH10"
time:
- platform: sntp
id: sntp_time
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
fast_connect: on
reboot_timeout: 0s
power_save_mode: high
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "S20 Fallback Hotspot"
password: !secret fallback_password
captive_portal:
# Enable web server
web_server:
port: 80
auth:
username: !secret web_server_user
password: !secret web_server_password
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: !secret hass_key
esphome:
name: ${device_name}
platform: ESP8266
board: esp8285
ota:
platform: esphome
password: !secret ota_password
sensor:
- platform: dht
model: dht22
pin: GPIO14
temperature:
name: ${friendly_name} Temperature
humidity:
name: ${friendly_name} Humidity
binary_sensor:
- platform: status
name: ${friendly_name} ${sonoff_type} Status
switch:
- platform: restart
name: ${friendly_name} ${sonoff_type} Restart
- platform: gpio
name: ${friendly_name} ${sonoff_type}
pin: GPIO12
id: relay
#restore_mode: ALWAYS_OFF
text_sensor:
- platform: wifi_info
ip_address:
name: ${friendly_name} ${sonoff_type} IP
ssid:
name: ${friendly_name} ${sonoff_type} SSID
bssid:
name: ${friendly_name} ${sonoff_type} BSSID