Add Anker MagGo 3-in-1 Wireless Charger (A25x7)#31
Conversation
Wires up the MagGo3in1 device class from SolixBLE: - adds the model to the config-flow dropdown (Models.MAGGO_3IN1) - maps it in get_power_station_class() - adds per-pad power sensors (Pad 1/2/3) + Total Power Depends on the SolixBLE library PR adding the MagGo3in1 device class. Claude-Session: https://claude.ai/code/session_014PHXj8zVt63X4FV8YBag7E
flip-dots
left a comment
There was a problem hiding this comment.
This is good, just a few minor things which are kind of my fault for not spelling out how they should be done in the code. This also needs some tests and again those tests are a bit messy/confusing, I reccomend taking a look at previous PRs to see how to add them (#29, #23, #18), but its basically just adding a few values to the already existing parameterised tests. Let me know if you need any help with that.
| device, "Pad 3 Power", "W", "pad_3_power", SensorDeviceClass.POWER | ||
| ) | ||
| ) | ||
| sensors.append( |
There was a problem hiding this comment.
There already is a sensor for total power that can be re-used.
There was a problem hiding this comment.
Removed the bespoke Total Power sensor and added MagGo3in1 to the existing "Total Power Out" (power_out) list instead.
| ) | ||
|
|
||
| # MagGo 3-in-1 wireless charger: per-pad power + total | ||
| if type(device) in [MagGo3in1]: |
There was a problem hiding this comment.
These need to be individual so that devices which might have just 1 wireless charging pad can make use of this code by just adding them to the list for that sensor.
There was a problem hiding this comment.
Done — split into three separate per-pad blocks, each gated on its own if type(device) in [MagGo3in1]: list, so a future single-pad device can be added to just the relevant pad's sensor.
- Split the single MagGo3in1 block into three separate per-pad blocks (Pad 1/2/3 Power), each gated on its own device-type list so a future single-pad device can opt in per sensor. - Drop the bespoke "Total Power" sensor; add MagGo3in1 to the existing "Total Power Out" (power_out) device list instead. - Add MOCK_MAGGO_3IN1_DETAILS/TEST_DATA and wire the model into the parameterised config_flow, init and sensor tests, mirroring the existing charger/power-bank models. Claude-Session: https://claude.ai/code/session_014PHXj8zVt63X4FV8YBag7E
Adds Home Assistant support for the Anker MagGo 3-in-1 Wireless Charger (model A25x7, serial prefix
ASHDKXU).Changes
Models.MAGGO_3IN1entry so it's selectable in the config-flow dropdown.MagGo3in1device class inget_power_station_class().Depends on
The SolixBLE library PR that adds the
MagGo3in1device class: flip-dots/SolixBLE#41 (this will need a SolixBLE release + arequirementsbump before it functions).Testing / confidence
Reverse-engineered from BLE captures. Negotiation was confirmed live on real hardware through this integration (via a Bluetooth proxy — the device connects, negotiates the ECDH session, and the raw telemetry was captured in debug mode). Per-pad power was confirmed against an Apple Watch at 2.8 W. See flip-dots/SolixBLE#41 for the full protocol/confidence notes.
https://claude.ai/code/session_014PHXj8zVt63X4FV8YBag7E