Last active
June 14, 2024 08:32
-
-
Save tribut/24da88affbf0d57a6ad143edcf6b53d0 to your computer and use it in GitHub Desktop.
Esphome config for DS102 (1 Gang)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
substitutions: | |
device_name: your_device_name | |
friendly_name: "Your Device Name" | |
api_password: "pass1" | |
ota_password: "pass2" | |
esphome: | |
name: ${device_name} | |
platform: ESP8266 | |
board: esp01_1m | |
wifi: | |
ssid: !secret wifi_name | |
password: !secret wifi_pass | |
fast_connect: True | |
logger: | |
api: | |
password: ${api_password} | |
ota: | |
password: ${ota_password} | |
status_led: | |
pin: | |
number: GPIO0 | |
inverted: True | |
binary_sensor: | |
- platform: gpio | |
pin: | |
number: GPIO3 | |
mode: INPUT_PULLUP | |
inverted: True | |
name: "${friendly_name} Button" | |
on_press: | |
- switch.toggle: relay_1 | |
switch: | |
- platform: gpio | |
name: "${friendly_name} Relay" | |
pin: GPIO13 | |
id: relay_1 | |
on_turn_on: | |
- light.turn_on: led_light | |
on_turn_off: | |
- light.turn_off: led_light | |
output: | |
- platform: esp8266_pwm | |
id: led | |
pin: GPIO14 | |
inverted: True | |
light: | |
- platform: monochromatic | |
name: "${friendly_name} LED" | |
output: led | |
internal: true | |
id: led_light |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment