devices.esphome.io

Geekbes YM-WS-1 Plug

Geekbes YM-WS-1 Plug

Device Type: plug
Electrical Standard: us
Board: esp8266

alt text

The GPIO pinout was learned from Blakadder Tasmota documentation and adapted through trial and error.

GPIO Pinout

PinFunction
GPIO12LedLink
GPIO13Button
GPIO15Relay

Basic Configuration

substitutions:
name: geekbes-ym-ws-1
friendly_name: Geekbes YM-WS-1 Plug
esphome:
name: ${name}
friendly_name: ${friendly_name}
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
- platform: esphome
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
captive_portal:
binary_sensor:
# Connected to HA
- platform: status
name: "Status"
# the on off button
- platform: gpio
pin: GPIO13
filters:
- invert:
- delayed_on: 100ms
- delayed_off: 100ms
- delayed_on_off: 100ms
name: "${friendly_name} Button"
on_press:
- switch.toggle: relay
switch:
# the relay that controls the output power
- platform: gpio
pin: GPIO15
name: "${friendly_name}"
id: relay
on_turn_on:
- switch.turn_on: blue_led
on_turn_off:
- switch.turn_off: blue_led
# the indicator led in the on off button
- platform: gpio
pin:
number: GPIO12
inverted: true
id: blue_led
Edit this page on GitHub