mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-11-10 10:11:29 +01:00
89 lines
1.4 KiB
YAML
89 lines
1.4 KiB
YAML
esphome:
|
|
name: <NAME_OF_NODE>
|
|
|
|
esp8266:
|
|
board: esp01_1m
|
|
|
|
wifi:
|
|
ssid: !secret wifi_ssid
|
|
password: !secret wifi_password
|
|
|
|
api:
|
|
|
|
logger:
|
|
|
|
ota:
|
|
|
|
binary_sensor:
|
|
- platform: gpio
|
|
pin:
|
|
number: GPIO0
|
|
mode:
|
|
input: true
|
|
pullup: true
|
|
inverted: true
|
|
name: "Sonoff 4CH Button 1"
|
|
on_press:
|
|
- switch.toggle: relay_1
|
|
- platform: gpio
|
|
pin:
|
|
number: GPIO9
|
|
mode:
|
|
input: true
|
|
pullup: true
|
|
inverted: true
|
|
name: "Sonoff 4CH Button 2"
|
|
on_press:
|
|
- switch.toggle: relay_2
|
|
- platform: gpio
|
|
pin:
|
|
number: GPIO10
|
|
mode:
|
|
input: true
|
|
pullup: true
|
|
inverted: true
|
|
name: "Sonoff 4CH Button 3"
|
|
on_press:
|
|
- switch.toggle: relay_3
|
|
- platform: gpio
|
|
pin:
|
|
number: GPIO14
|
|
mode:
|
|
input: true
|
|
pullup: true
|
|
inverted: true
|
|
name: "Sonoff 4CH Button 4"
|
|
on_press:
|
|
- switch.toggle: relay_4
|
|
- platform: status
|
|
name: "Sonoff 4CH Status"
|
|
|
|
switch:
|
|
- platform: gpio
|
|
name: "Sonoff 4CH Relay 1"
|
|
pin: GPIO12
|
|
id: relay_1
|
|
- platform: gpio
|
|
name: "Sonoff 4CH Relay 2"
|
|
pin: GPIO5
|
|
id: relay_2
|
|
- platform: gpio
|
|
name: "Sonoff 4CH Relay 3"
|
|
pin: GPIO4
|
|
id: relay_3
|
|
- platform: gpio
|
|
name: "Sonoff 4CH Relay 4"
|
|
pin: GPIO15
|
|
id: relay_4
|
|
|
|
output:
|
|
- platform: esp8266_pwm
|
|
id: blue_led
|
|
pin: GPIO13
|
|
inverted: true
|
|
|
|
light:
|
|
- platform: monochromatic
|
|
name: "Sonoff 4CH Blue LED"
|
|
output: blue_led
|