-
Notifications
You must be signed in to change notification settings - Fork 5
/
Sonoff_Mini_custom.yaml
80 lines (68 loc) · 1.35 KB
/
Sonoff_Mini_custom.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
esphome:
name: <YOUR NAME>
platform: ESP8266
board: esp8285
ifi:
ssid: "<YOUR SSID>"
password: "<YOUR PASSWORD>"
manual_ip:
static_ip: <YOUR IP>
gateway: <YOUR GATEWAY>
subnet: <YOUR SUBNET>
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "<YOUR FALLBACK SSID>"
password: "<YOUR FALLBACK PASSWORD>"
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
api:
password: "<YOUR API PASSWORD>"
ota:
password: "<YOUR API PASSWORD>"
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
- platform: gpio
name: "Switch_Relay"
pin: GPIO04
id: switch_01
on_press:
then:
- switch.toggle:
id: relay
on_release:
then:
- switch.toggle:
id: relay
switch:
- platform: gpio
name: "Relay"
pin: GPIO12
id: relay
restore_mode: restore_default_off
on_turn_on:
- switch.turn_on:
id: RelayLED
on_turn_off:
- switch.turn_off:
id: RelayLED
- platform: gpio
name: "RelayLED"
pin: GPIO2
id: RelayLED
restore_mode: restore_default_off
internal: true