The Atom Socket component controls the socket switch and reads energy parameters.
| Item | Information |
|---|---|
| Product Name | Atom Socket |
| SKU | K055 |
| Main Function | Socket control; voltage, current, and power monitoring |
| Communication Interface | UART, GPIO |
| ESPHome Components | hlw8032, gpio |
| ESPHome Version Requirement | / |
Configure the UART bus:
uart:
rx_pin: GPIO22
baud_rate: 4800
parity: EVEN Add the Sensor component:
The HLW8032 energy metering chip collects voltage, current, and power data.
sensor:
- platform: hlw8032
voltage:
name: HLW8032 Voltage
id: hlw8032_voltage
current:
name: HLW8032 Current
id: hlw8032_current
power:
name: HLW8032 Power
id: hlw8032_power
apparent_power:
name: HLW8032 Apparent Power
id: hlw8032_apparent_power
power_factor:
name: HLW8032 Power Factor
id: hlw8032_power_factor Add the Switch component:
switch:
- platform: gpio
name: "Atom Socket"
pin:
number: GPIO23
inverted: false
restore_mode: ALWAYS_ON
After connecting the device to Home Assistant, you can view the socket switch and energy monitoring entities: