Skip to content

Add Anker MagGo 3-in-1 Wireless Charger (A25x7)#31

Open
radzio wants to merge 2 commits into
flip-dots:mainfrom
radzio:add-maggo-3in1-charger
Open

Add Anker MagGo 3-in-1 Wireless Charger (A25x7)#31
radzio wants to merge 2 commits into
flip-dots:mainfrom
radzio:add-maggo-3in1-charger

Conversation

@radzio

@radzio radzio commented Jul 6, 2026

Copy link
Copy Markdown

Adds Home Assistant support for the Anker MagGo 3-in-1 Wireless Charger (model A25x7, serial prefix ASHDKXU).

Changes

  • New Models.MAGGO_3IN1 entry so it's selectable in the config-flow dropdown.
  • Mapped to the MagGo3in1 device class in get_power_station_class().
  • Sensors: Pad 1 / Pad 2 / Pad 3 Power (W) + Total Power (W).

Depends on

The SolixBLE library PR that adds the MagGo3in1 device class: flip-dots/SolixBLE#41 (this will need a SolixBLE release + a requirements bump 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

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 flip-dots left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread custom_components/solix_ble/sensor.py Outdated
device, "Pad 3 Power", "W", "pad_3_power", SensorDeviceClass.POWER
)
)
sensors.append(

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There already is a sensor for total power that can be re-used.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants