esphome-docs/devices/teckin.yaml

71 lines
1.2 KiB
YAML
Raw Normal View History

2019-02-26 15:09:29 +01:00
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: true
pullup: true
inverted: true
2019-02-26 15:09:29 +01:00
on_press:
- switch.toggle: relay
switch:
- platform: gpio
id: blue_led
pin:
number: GPIO13
inverted: true
2019-02-26 15:09:29 +01:00
- 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
2019-02-26 15:09:29 +01:00
sensor:
- platform: hlw8012
sel_pin:
number: GPIO12
inverted: true
2019-02-26 15:09:29 +01:00
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