-
Notifications
You must be signed in to change notification settings - Fork 1
/
ssr.yaml
127 lines (105 loc) · 2.25 KB
/
ssr.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
esphome:
name: ssr
platform: ESP8266
board: esp12e
esp8266_restore_from_flash: yes
wifi:
ssid: !secret wifi-ssid
password: !secret wifi-pwd
# use_address: esp-balkony.ak-online.be
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "SSR Fallback Hotspot"
password: !secret fallback-password
mdns:
disabled: true
captive_portal:
# Enable logging
logger:
# Enable Home Assistant API
#api:
mqtt:
broker: mqtt.ak-online.be
discovery: true
topic_prefix: esphome/ssr
ota:
web_server:
port: 80
include_internal: true
sensor:
- platform: wifi_signal
name: "WiFi Signal ESP SSR"
update_interval: 60s
light:
- platform: binary
name: Herrnhuter
id: herrnhuter
output: ssr
on_turn_on:
- light.turn_on:
id: status
on_turn_off:
- light.turn_off:
id: status
- platform: binary
id: status
output: out_led
script:
- id: runON
then:
- light.turn_on:
id: herrnhuter
- id: runOFF
then:
- light.turn_off:
id: herrnhuter
transition_length: 0ms
- id: run_toggles
then:
# turn on to start from the ON state
- script.execute: runON
- script.wait: runON
- delay: 10s
# start the reset sequence
- script.execute: runOFF
- script.wait: runOFF
- delay: 1s
- script.execute: runON
- script.wait: runON
- delay: 1s
- script.execute: runOFF
- script.wait: runOFF
- delay: 1s
- script.execute: runON
- script.wait: runON
- delay: 1s
- script.execute: runOFF
- script.wait: runOFF
- delay: 1s
- script.execute: runON
- script.wait: runON
- delay: 1s
- script.execute: runOFF
- script.wait: runOFF
- delay: 1s
- script.execute: runON
- script.wait: runON
- delay: 1s
- script.execute: runOFF
- script.wait: runOFF
- delay: 1s
- script.execute: runON
- script.wait: runON
switch:
- platform: template
name: run zigbee light reset
turn_on_action:
- script.execute: run_toggles
output:
- platform: gpio
pin: GPIO02
id: out_led
inverted: true
- platform: gpio
id: ssr
pin: GPIO13