-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added geekbes-ym-ws-1 * Better message
- Loading branch information
Showing
2 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
--- | ||
title: Geekbes YM-WS-1 Plug | ||
date-published: 2024-12-10 | ||
type: plug | ||
standard: us | ||
board: esp8266 | ||
--- | ||
|
||
![alt text](geekbes_YM-WS-1.png "Geekbes YM-WS-1 Plug") | ||
|
||
The GPIO pinout was learned from [Blakadder Tasmota](https://templates.blakadder.com/geekbes_YM-WS-1.html) documentation and adapted through trial and error. | ||
|
||
## GPIO Pinout | ||
|
||
| Pin | Function | | ||
| ------ | ------------------- | | ||
| GPIO12 | LedLink | | ||
| GPIO13 | Button | | ||
| GPIO15 | Relay | | ||
|
||
## Basic Configuration | ||
|
||
```yaml | ||
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 | ||
``` |