2019-02-16 23:25:23 +01:00
|
|
|
esphome:
|
2018-10-07 10:04:42 +02:00
|
|
|
name: <NAME_OF_NODE>
|
2022-02-10 23:10:43 +01:00
|
|
|
|
|
|
|
esp8266:
|
2018-10-07 10:04:42 +02:00
|
|
|
board: esp01_1m
|
|
|
|
|
|
|
|
wifi:
|
2022-02-10 23:10:43 +01:00
|
|
|
ssid: !secret wifi_ssid
|
|
|
|
password: !secret wifi_password
|
2018-10-07 10:04:42 +02:00
|
|
|
|
2019-02-17 12:28:17 +01:00
|
|
|
api:
|
2018-10-07 10:04:42 +02:00
|
|
|
|
|
|
|
logger:
|
|
|
|
|
|
|
|
ota:
|
|
|
|
|
|
|
|
binary_sensor:
|
|
|
|
- platform: gpio
|
|
|
|
pin:
|
|
|
|
number: GPIO0
|
2021-11-03 19:55:26 +01:00
|
|
|
mode:
|
|
|
|
input: true
|
|
|
|
pullup: true
|
2021-07-28 23:56:11 +02:00
|
|
|
inverted: true
|
2018-10-07 10:04:42 +02:00
|
|
|
name: "Sonoff 4CH Button 1"
|
|
|
|
on_press:
|
2019-01-09 14:43:18 +01:00
|
|
|
- switch.toggle: relay_1
|
2018-10-07 10:04:42 +02:00
|
|
|
- platform: gpio
|
|
|
|
pin:
|
|
|
|
number: GPIO9
|
2021-11-03 19:55:26 +01:00
|
|
|
mode:
|
|
|
|
input: true
|
|
|
|
pullup: true
|
2021-07-28 23:56:11 +02:00
|
|
|
inverted: true
|
2018-10-07 10:04:42 +02:00
|
|
|
name: "Sonoff 4CH Button 2"
|
|
|
|
on_press:
|
2019-01-09 14:43:18 +01:00
|
|
|
- switch.toggle: relay_2
|
2018-10-07 10:04:42 +02:00
|
|
|
- platform: gpio
|
|
|
|
pin:
|
|
|
|
number: GPIO10
|
2021-11-03 19:55:26 +01:00
|
|
|
mode:
|
|
|
|
input: true
|
|
|
|
pullup: true
|
2021-07-28 23:56:11 +02:00
|
|
|
inverted: true
|
2018-10-07 10:04:42 +02:00
|
|
|
name: "Sonoff 4CH Button 3"
|
|
|
|
on_press:
|
2019-01-09 14:43:18 +01:00
|
|
|
- switch.toggle: relay_3
|
2018-10-07 10:04:42 +02:00
|
|
|
- platform: gpio
|
|
|
|
pin:
|
|
|
|
number: GPIO14
|
2021-11-03 19:55:26 +01:00
|
|
|
mode:
|
|
|
|
input: true
|
|
|
|
pullup: true
|
2021-07-28 23:56:11 +02:00
|
|
|
inverted: true
|
2018-10-07 10:04:42 +02:00
|
|
|
name: "Sonoff 4CH Button 4"
|
|
|
|
on_press:
|
2019-01-09 14:43:18 +01:00
|
|
|
- switch.toggle: relay_4
|
2018-10-07 10:04:42 +02:00
|
|
|
- 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
|
2021-07-28 23:56:11 +02:00
|
|
|
inverted: true
|
2018-10-07 10:04:42 +02:00
|
|
|
|
|
|
|
light:
|
|
|
|
- platform: monochromatic
|
|
|
|
name: "Sonoff 4CH Blue LED"
|
|
|
|
output: blue_led
|