Skip to content

Instantly share code, notes, and snippets.

@tuxmartin
Last active October 1, 2022 15:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuxmartin/56a03100202a53c0d5c2f3e17e9ad9c3 to your computer and use it in GitHub Desktop.
Save tuxmartin/56a03100202a53c0d5c2f3e17e9ad9c3 to your computer and use it in GitHub Desktop.
IoT: ESPHome current transformer
esphome:
name: test
platform: ESP32
board: esp32doit-devkit-v1
wifi:
ssid: "My_WiFi_AP"
password: "secretPassword123"
ap:
ssid: "Test Fallback Hotspot"
password: "123abc456"
captive_portal:
logger:
api:
password: "asdf"
ota:
password: "asdf"
mqtt:
broker: 10.123.1.1
port: 1883
topic_prefix: xxx
i2c:
sda: 21
scl: 22
scan: True
ads1115:
- address: 0x48
sensor:
- platform: ct_clamp
sensor: adc_sensor
name: "Measured Current A0-GND"
update_interval: 6s
sample_duration: 5s
accuracy_decimals: 4
filters:
- calibrate_polynomial:
degree: 2
datapoints:
- 0.00 -> -0.10
- 0.04 -> 0.92
- 0.20 -> 4.17
- 0.37 -> 8.42
- platform: ads1115
multiplexer: 'A0_GND'
gain: 2.048
name: "ADC A0-GND voltage"
id: adc_sensor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment