Skip to content

Instantly share code, notes, and snippets.

@timmo001
Created March 10, 2019 02:30
Show Gist options
  • Save timmo001/7b0cf9958b80f6356a3f47d2f29aa1a6 to your computer and use it in GitHub Desktop.
Save timmo001/7b0cf9958b80f6356a3f47d2f29aa1a6 to your computer and use it in GitHub Desktop.
---
esphome:
name: teckinsp23001
platform: ESP8266
board: esp8285
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: !secret ota_password
web_server:
port: 80
time:
- platform: homeassistant
id: homeassistant_time
binary_sensor:
- platform: status
name: "Teckin SP23 001 Status"
- platform: gpio
pin:
number: GPIO13
inverted: True
name: "Teckin SP23 001 Button"
switch:
- platform: restart
name: "Teckin SP23 001 Restart"
- platform: gpio
name: "Teckin SP23 001 Relay"
pin: GPIO15
restore_mode: ALWAYS_ON
- platform: gpio
name: "Teckin SP23 001 LED Blue"
pin: GPIO02
inverted: True
restore_mode: ALWAYS_OFF
- platform: gpio
name: "Teckin SP23 001 LED Red"
pin: GPIO0
inverted: True
restore_mode: ALWAYS_OFF
sensor:
- platform: wifi_signal
name: "Teckin SP23 001 WiFi Signal"
update_interval: 60s
- platform: uptime
name: "Teckin SP23 001 Uptime"
- platform: hlw8012
sel_pin:
number: GPIO12
inverted: True
cf_pin: GPIO05
cf1_pin: GPIO14
# Higher value gives lower watt readout
current_resistor: 0.00221
# Lower value gives lower voltage readout
voltage_divider: 871
current:
name: "Teckin SP23 001 Amperage"
unit_of_measurement: A
voltage:
name: "Teckin SP23 001 Voltage"
unit_of_measurement: V
power:
name: "Teckin SP23 001 Wattage"
unit_of_measurement: W
id: "teckin_001_wattage"
change_mode_every: 8
update_interval: 10s
- platform: total_daily_energy
name: "Teckin SP23 001 Total Daily Energy"
power_id: "teckin_001_wattage"
filters:
# Multiplication factor from W to kW is 0.001
- multiply: 0.001
unit_of_measurement: kWh
text_sensor:
- platform: version
name: "Teckin SP23 001 ESPHome Version"
@Grambo1966
Copy link

Just what i'm looking for!
Thank You

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment