-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.device-sonoff_mini.yaml
executable file
·54 lines (45 loc) · 1.15 KB
/
.device-sonoff_mini.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
# Start config for Sonoff mini Configuration
esphome:
name: $devicename
platform: ESP8266
board: esp01_1m
comment: $devicetype
logger:
# tasmota template: {"NAME":"Sonoff Mini","GPIO":[17,0,0,0,9,0,0,0,21,56,0,0,255],"FLAG":0,"BASE":1}
# tasmota template decoded: GPIO: GPIO00 17 Button1, GPIO04 9 Switch1, GPIO12 21 Relay1, GPIO13 56 Led1i, GPIO16 255 userdef; BASE: Sonoff Basic
status_led:
pin:
number: GPIO13
inverted: true
binary_sensor:
- platform: gpio
pin: GPIO00
id: reset
internal: true
filters:
- invert:
- delayed_off: 10ms
on_press:
- switch.toggle:
id: relay_1
- platform: gpio
name: "$friendly_name switch"
pin: GPIO04
id: switch_1
on_press:
then:
- switch.turn_on:
id: relay_1
on_release:
then:
- switch.turn_off:
id: relay_1
- platform: status #Get Current status of API connection
name: $friendly_name Status
switch:
- platform: gpio
name: "$friendly_name"
pin: GPIO12
id: relay_1
restore_mode: $restore_mode
sensor: