-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sonoff S20 - Switch with DS18B20 sensor
99 lines (81 loc) · 1.71 KB
/
Sonoff S20 - Switch with DS18B20 sensor
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
substitutions:
name: "{{name of the device}}"
friendly_name: "{{friendly name}}"
esphome:
name: "${name}"
friendly_name: "${friendly_name}"
project:
name: esphome.sonoff_s20_switch_ds18b20-template
version: "1.0"
esp8266:
board: sonoff_s20
restore_from_flash: true
preferences:
flash_write_interval: 0s
logger:
api:
encryption:
key: !secret api_encryption_key
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
password: !secret ap_password
captive_portal:
web_server:
port: 80
auth:
username: !secret web_server_username
password: !secret web_server_password
version: 2
local: true
text_sensor:
- platform: wifi_info
ip_address:
name: WiFi - IP-address
ssid:
name: WiFi - Connected SSID
bssid:
name: WiFi - Connected BSSID
mac_address:
name: WiFi - MAC-address
scan_results:
name: WiFi - Latest Scan Results
dns_address:
name: WiFi - DNS Address
sensor:
- platform: wifi_signal
name: "WiFi - Signal"
update_interval: 60s
entity_category: "diagnostic"
### EDIT BELOW THIS LINE ###
- platform: dallas
address: {{hardware ID}}
name: "DS18B20 - {{description}}"
binary_sensor:
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: True
name: "Device - Button"
on_press:
- switch.toggle: relay
- platform: status
name: "API - Status"
dallas:
- pin: GPIO3
switch:
- platform: restart
name: "Device - Restart"
- platform: gpio
name: "Device - Relay"
pin: GPIO12
id: relay
restore_mode: {{restore mode}}
status_led:
pin:
number: GPIO13
inverted: true