Skip to content

Instantly share code, notes, and snippets.

@fabaff
Created May 10, 2019 20:14
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 fabaff/762008f61e745b220b9f4693954427e2 to your computer and use it in GitHub Desktop.
Save fabaff/762008f61e745b220b9f4693954427e2 to your computer and use it in GitHub Desktop.
Power monitoring with ESP32, INA219, esphome and Home Assistant
esphome:
name: pm
platform: ESP32
board: esp32dev
wifi:
ssid: 'YOUR_SSID'
password: 'YOUR_PASSWORD'
mqtt:
broker: '192.168.168.2'
username: ''
password: ''
logger:
ota:
web_server:
port: 80
i2c:
sda: 21
scl: 22
binary_sensor:
- platform: status
name: "PM Status"
sensor:
- platform: esp32_hall
name: "PM Hall"
update_interval: 15s
id: hall
- platform: ina219
address: 0x40
shunt_resistance: 0.1 ohm
current:
name: "PM Current"
power:
name: "PM Power"
bus_voltage:
name: "PM Bus Voltage"
shunt_voltage:
name: "PM Shunt Voltage"
max_voltage: 32.0V
max_current: 3.2A
update_interval: 5s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment