private@homelab: ~/latest
local-first guides · privacy-aware · no noisy tracking
private@homelab:~$ cat guides/article.md
· ·
6–9 minutes
read

Aqara Mini Switch E1 (WXKG20LM): Zigbee2MQTT Setup Guide

Pairing the Aqara E1 Mini Switch (WXKG20LM) with Zigbee2MQTT skips the hub. Here's every entity it exposes and how to automate it in Home Assistant.

The Aqara Wireless Mini Switch E1, model number WXKG20LM, is the version Aqara currently ships when you buy a “mini switch” today. That’s worth saying up front, because there are at least two other Aqara buttons with overlapping names floating around forums and old blog posts, and mixing them up wastes time chasing behavior your specific button doesn’t have.

I paired one of these directly to Zigbee2MQTT with no Aqara hub and no Aqara Home app involved. Below is the full entity set it exposes, what device_temperature actually measures on this thing, and how to build Home Assistant automations off its three button actions.

What You’re Actually Holding: WXKG20LM vs the Other “Mini Switch” SKUs

Aqara has shipped several devices under “mini switch” or “wireless switch” naming across generations. The ones that matter for disambiguation:

  • WXKG11LM — the original round mini switch, an older generation with its own entity set.
  • WXKG14LM — the Wireless Mini Switch T1.
  • WXKG20LM — the Wireless Mini Switch E1, the one this article covers.

In Zigbee2MQTT and your logs, the WXKG20LM identifies as lumi.remote.acn007. If you’re staring at a freshly discovered device entry trying to confirm which physical button you paired, that model string is the fastest way to check. The model number printed on the back of the plastic is small and easy to misread, especially under Aqara’s tiny embossed font.

I’ve covered the original WXKG11LM separately since its entity set differs from this one — see the WXKG11LM Zigbee2MQTT guide. And if what you actually bought was a double-rocker E1 wireless switch rather than this single button, that’s a different device with its own guide.

Pairing With Zigbee2MQTT, No Hub Required

This is a battery-powered Zigbee end device, not something that depends on an Aqara hub to function. It pairs directly to any Zigbee2MQTT coordinator the same way most Aqara sensors do: put your Z2M instance into pairing mode (permit_join, either from the frontend or over MQTT), then trigger pairing on the switch itself.

To trigger pairing, press and hold the button until the blue LED starts blinking, then release. If the device joins but never reports any actions, it likely dropped into deep sleep partway through the interview — keep it awake by pressing the button roughly once a second until pairing completes. Once it joins, it shows up in the Z2M device list as lumi.remote.acn007.

What I didn’t expect the first time was the battery entity sitting at “unknown” for most of a day after pairing. Nothing was wrong. The device only reports battery periodically, and Zigbee2MQTT’s own documentation notes that report can take up to 24 hours to arrive after joining. If you’re staring at a freshly paired device wondering whether pairing actually worked, check the action entity instead. That one updates the instant you press the button. Battery is just slow to phone home, and there’s no way to force it early.

The Full Entity Set

Once paired, the WXKG20LM exposes:

  • action — the button event itself: single, double, or hold. This is what your automations trigger off.
  • battery — percentage, read-only, reported on the delayed schedule above.
  • voltage — millivolts. Worth cross-referencing against the battery percentage late in the coin cell’s life, since voltage is the raw measurement and percentage is Aqara’s derived estimate from it.
  • device_temperature — degrees C, covered in its own section below because it gets misread constantly.
  • power_outage_count — total power interruptions since the device was last paired.

Worth knowing: power_outage_count on a coin-cell button is an odd entity to see. It’s the kind of diagnostic you’d expect on a mains-powered relay or plug, not a battery-only remote, and it’s one of the clearer tells that separates this device’s internals from its rocker-style E1 siblings.

The action, battery, voltage, device_temperature, and power_outage_count entities are all read-only. The WXKG20LM doesn’t expose the kind of /get or /set state controls a plug or relay does. The one writable option surfaced by the current Zigbee2MQTT device page is device_temperature_calibration, an absolute offset applied to the temperature reading on its next report rather than something you can push and see reflected immediately. If your Z2M version’s Exposes tab shows something different, trust the tab over this list — Aqara’s converters shift between releases.

Building Home Assistant Automations From single/double/hold

Three distinct actions is more than the short/long split you get from cheaper buttons that only distinguish two press lengths. A basic automation triggers on the action entity, firing when its value equals single, double, or hold.

hold is the one worth planning around, and it’s also the one people get wrong. On the WXKG20LM it fires once, as a discrete event, when you hold the button past its internal threshold. It is not a continuous press-and-hold stream with a matching release edge. The current Zigbee2MQTT definition for lumi.remote.acn007 exposes single, double, and hold and no separate release action — so you can’t build “dim while I hold, stop the instant I let go” directly off the button the way you can with switches that emit a release.

If you want press-and-hold dimming, you drive it from the Home Assistant side. Start a dimming loop on hold — a script that steps brightness up or down on a repeat — and stop it on a timeout or on the next single press, rather than waiting for a release that never arrives. That’s a little more automation logic than a release-based switch would need, but it’s a well-worn Home Assistant pattern and it’s reliable once it’s built. If continuous, release-driven dimming matters to you, that’s a point in favor of a switch that reports release natively — worth knowing before you standardize on this button across a house.

device_temperature Isn’t Room Temperature

This one comes up constantly, so it gets its own section. device_temperature on the WXKG20LM reflects the internal chip temperature, not ambient room temperature. That’s consistent with how the same entity name behaves on other Aqara battery devices covered on this site. Don’t build a “room feels warm” automation off this entity. It’ll track heat from the device’s own components and whatever’s warming the wall or surface it’s mounted to, not the air in the room.

Which Mini Switch to Buy If You’re Starting From Scratch

If you’re buying new today, the WXKG20LM (E1) is most likely what shows up when a retailer lists “Aqara mini switch.” Its predecessor, the T1 (WXKG14LM), is also a single-button device and behaves similarly in Zigbee2MQTT — same core single/double/hold action model plus the battery, voltage, and device_temperature entities. If you already own a T1 or are weighing the two, the WXKG14LM T1 guide covers its specifics; there’s no local-control feature the T1 has that the E1 lacks.

What matters more long-term than which mini switch generation you pick is protocol choice. Zigbee2MQTT versus ZHA affects how you troubleshoot every device on your network, not just this one — see ZHA vs Zigbee2MQTT for Aqara devices.

FAQ

What’s the difference between the WXKG20LM and the Wireless Mini Switch T1 (WXKG14LM)?
Both are single-button Aqara “mini switch” devices from different generations. In Zigbee2MQTT they behave similarly: the same single/double/hold action model and the same battery, voltage, and device_temperature entities. The E1 (WXKG20LM) is the current retail version; the T1 is the older one.

Does the WXKG20LM need the Aqara hub to work with Home Assistant?
No. It pairs directly to a Zigbee2MQTT coordinator as an end device, no Aqara hub or Aqara Home app required.

How many click actions does the WXKG20LM support?
Three: single, double, and hold. The current Zigbee2MQTT definition doesn’t expose a separate release action, so press-and-hold dimming has to be driven from your automation logic rather than a release edge.

Why does my mini switch show a device_temperature entity? Is that room temperature?
No. It’s the internal chip temperature, not ambient air temperature.

Can I read the battery level on demand, or only wait for the periodic report?
Only the periodic report. The device doesn’t support MQTT /get commands, and that report can take up to 24 hours after pairing to show up for the first time.

Aqara’s kept the “mini switch” name across three different hardware generations for going on six years now, and I doubt the WXKG20LM is the last one. If a successor shows up carrying the same acn007-style model prefix, the entity set documented here is the baseline worth checking against for what’s actually new.

local-firstHome Assistantno-cloud