mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-11-18 11:15:36 +01:00
69 lines
1.2 KiB
YAML
69 lines
1.2 KiB
YAML
|
esphome:
|
||
|
name: '<NODE_NAME>'
|
||
|
platform: ESP8266
|
||
|
board: esp01_1m
|
||
|
|
||
|
wifi:
|
||
|
ssid: '<WIFI_SSID>'
|
||
|
password: '<WIFI_PASSWORD>'
|
||
|
|
||
|
logger:
|
||
|
# Disable UART logging (pins GPIO1/3 are used for button/led)
|
||
|
baud_rate: 0
|
||
|
|
||
|
# Enable Home Assistant API
|
||
|
api:
|
||
|
|
||
|
ota:
|
||
|
|
||
|
binary_sensor:
|
||
|
- platform: gpio
|
||
|
name: "Teckin Button"
|
||
|
pin:
|
||
|
number: GPIO1
|
||
|
mode: INPUT_PULLUP
|
||
|
inverted: True
|
||
|
on_press:
|
||
|
- switch.toggle: relay
|
||
|
|
||
|
switch:
|
||
|
- platform: gpio
|
||
|
id: blue_led
|
||
|
pin:
|
||
|
number: GPIO13
|
||
|
inverted: True
|
||
|
- platform: gpio
|
||
|
name: "Teckin Relay"
|
||
|
pin: GPIO14
|
||
|
id: relay
|
||
|
on_turn_on:
|
||
|
- switch.turn_on: blue_led
|
||
|
on_turn_off:
|
||
|
- switch.turn_off: blue_led
|
||
|
|
||
|
# Use red LED for connectivity status indicator
|
||
|
status_led:
|
||
|
pin:
|
||
|
number: GPIO3
|
||
|
inverted: True
|
||
|
|
||
|
sensor:
|
||
|
- platform: hlw8012
|
||
|
sel_pin:
|
||
|
number: GPIO12
|
||
|
inverted: True
|
||
|
cf_pin: GPIO04
|
||
|
cf1_pin: GPIO05
|
||
|
# Higher value gives lower watt readout
|
||
|
current_resistor: 0.00221
|
||
|
# Lower value gives lower voltage readout
|
||
|
voltage_divider: 871
|
||
|
current:
|
||
|
name: "Teckin Current"
|
||
|
accuracy_decimals: 2
|
||
|
voltage:
|
||
|
name: "Teckin Voltage"
|
||
|
power:
|
||
|
name: "Teckin Power"
|
||
|
update_interval: 15s
|