forked from glmnet/esphome_devices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.gpio0.yaml
47 lines (37 loc) · 838 Bytes
/
test.gpio0.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
# single test esp12f led (GPIO2) and some boards (GPIO16 led)
# leds are toggled with GPIO0 (usually built in flash button)
esphome:
name: uptime_test
platform: ESP8266
board: nodemcuv2
platformio_options:
upload_speed: 921600
arduino_version: dev
logger:
level: VERY_VERBOSE
binary_sensor:
- platform: gpio
id: flash_btn
pin: GPIO0
on_press:
- light.toggle: esp_led_light
- light.toggle: esp_led_light2
output:
- platform: gpio
pin: GPIO2
id: esp_led
inverted: true
- platform: gpio
pin: GPIO16
id: esp_led2
light:
- platform: binary
output: esp_led
id: esp_led_light
on_turn_on:
- logger.log: 'light is on!'
on_turn_off:
- logger.log: 'light gone -- dark comming!'
- platform: binary
output: esp_led2
id: esp_led_light2