This tutorial will introduce how to use the Unit INA226 10A/1A DC electrical parameter measurement unit with the AtomS3R main controller and integrate it into Home Assistant to achieve real-time monitoring of DC voltage, current, and power.

CONTINUE.

New Device Setup to enter the device creation wizard.
NEXT.
ESP32S3.
SKIP to skip the encryption key setting.
EDIT to enter the YAML configuration page and customize device functions.
Add the I2C component to configure the communication pins between Unit INA226 10A/1A and AtomS3R.
i2c:
sda: GPIO2
scl: GPIO1
scan: true Add the Sensor component to enable the INA226 sensor entity.
sensor:
- platform: ina226
address: 0x41
# 10A
shunt_resistance: 0.08 ohm
# 1A
# shunt_resistance: 0.005 ohm
adc_time:
voltage: 140us
current: 332us
adc_averaging: 4
update_interval: 2s
current:
name: "Current"
accuracy_decimals: 4
shunt_voltage:
name: "Shunt_Voltage"
accuracy_decimals: 5
bus_voltage:
name: "Bus_Voltage"
accuracy_decimals: 4
power:
name: "Power"
accuracy_decimals: 4 Main Parameter Descriptions:
| Parameter | Value | Description |
|---|---|---|
address | 0x41 | I2C address of Unit INA226 10A/1A. |
shunt_resistance | 0.08 ohm / 0.005 ohm | Use 0.08 for 10A and 0.005 for 1A shunt resistors. |
adc_time | 140us / 332us | ADC conversion time; voltage and current can be set separately. |
update_interval | 2s | Time interval for updating measurement values to Home Assistant. |
current | Current | Reports DC current in Amperes (A). |
shunt_voltage | Shunt Voltage | Reports shunt voltage in Volts (V). |
bus_voltage | Bus Voltage | Reports bus voltage in Volts (V). |
power | Power | Reports power in Watts (W). |
SAVE in the upper right corner to save the configuration, then click INSTALL.
Manual Download in the pop-up window.
Download and select Factory format (Previously Modern) to save the firmware locally.
CONNECT.

INSTALL.

Settings > Devices & Services in sequence to enter the integration management page.
Discovered area, click CONFIGURE, and follow the wizard to complete the configuration.

