This tutorial will introduce how to use the Unit AC Measure AC electrical parameter measurement unit with the AtomS3R main controller and integrate it into Home Assistant to achieve real-time monitoring of AC voltage, current, active power, and energy consumption.

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 External Components configuration in the YAML file to load the unit_acmeasure sensor driver.
external_components:
- source: github://m5stack/esphome-yaml/components
components: unit_acmeasure
refresh: 0s Add the I2C component to configure the communication pins between Unit AC Measure and AtomS3R.
i2c:
sda: GPIO2
scl: GPIO1
scan: true Add the Sensor component to enable AC measurement-related sensor entities.
sensor:
- platform: unit_acmeasure
id: acmeasure1
address: 0x42
update_interval: 2s
voltage:
name: AC Voltage
current:
name: AC Current
power:
name: Active Power
apparent_power:
name: Apparent Power
power_factor:
name: Power Factor
energy:
name: Energy Main Parameter Descriptions:
| Parameter | Value | Description |
|---|---|---|
address | 0x42 | I2C address of Unit AC Measure. |
update_interval | 2s | Time interval for updating AC measurement values to Home Assistant. |
voltage | AC Voltage | Reports the AC voltage (RMS) of the measured circuit. |
current | AC Current | Reports the AC current (RMS). |
power | Active Power | Reports the active power in Watts (W). |
apparent_power | Apparent Power | Reports the apparent power in Volt-Amperes (VA). |
power_factor | Power Factor | Reports the power factor (ratio of active power to apparent power). |
energy | Energy | Reports the accumulated energy consumption. |
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.

