-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathesp_switch.yaml
43 lines (37 loc) · 897 Bytes
/
esp_switch.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
esphome:
name: espnow-switch
platform: ESP8266
board: nodemcuv2
arduino_version: LATEST
includes:
- esp_switch.h
wifi:
ssid: "YOUR_WIFI"
password: "YOUR_PASSWORD"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "NodeMCU Fallback Hotspot"
password: "CPELMiEbGFha"
captive_portal:
# Enable logging
logger:
level: NONE
baud_rate: 0
# Enable Home Assistant API
api:
password: "flippityflip"
binary_sensor:
- platform: custom
lambda: |-
auto esp_switch = new ESPSwitch("11:11:11:11:11:11");
App.register_component(esp_switch);
return {esp_switch};
binary_sensors:
name: "ESPSwitch0"
- platform: custom
lambda: |-
auto esp_switch = new ESPSwitch("22:22:22:22:22:22");
App.register_component(esp_switch);
return {esp_switch};
binary_sensors:
name: "ESPSwitch1"