Controlling Dual-Zone Heating on Xiaomi Blankets with switch.xxxx_a_b_gears using Xiaomi Miot Auto #2395
janfajessen
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I wanted to share a solution for controlling dual-zone heating (sides A and B) on Xiaomi electric blankets using the "Xiaomi Miot Auto" integration in Home Assistant. This approach works not only for my specific model (xiaomi.blanket.mj1) but also for any Xiaomi electric blanket that exposes a switch.xxxx_a_b_gears entity, where xxxx represents the model and serial number of your device (e.g., switch.xiaomi_mj1_3814_a_b_gears in my case). The key is leveraging the custom.a_b_gears property, which combines the heating levels for both sides into a single value (e.g., "1-3" for A=1, B=3).
Device Details
My Model: xiaomi.blanket.mj1
MIoT Spec: urn:miot-spec-v2:device:electric-blanket:0000A069:xiaomi-mj1:1
Key Property: custom.a_b_gears (controls both A and B levels in "A-B" format)
General Applicability: Works with any blanket having a switch.xxxx_a_b_gears entity.
Challenge
The integration lists heat_level_a and heat_level_b in select_properties, but these don’t map to separate MIoT properties on my device. Instead, custom.a_b_gears is the actual property controlling both sides. This seems common for Xiaomi dual-zone blankets, so if your device has a switch.xxxx_a_b_gears entity (check in "Developer Tools" > "States"), this solution should apply!
Solution: Virtual Selectors with input_select
This method creates two virtual selectors in Home Assistant to independently adjust the A and B levels, which are then combined and sent to custom.a_b_gears.
Add this to your configuration.yaml:
Then, add the selectors to your dashboard:
How It Works
Changing the selectors (e.g., A to 2, B to 3) triggers the automation, setting custom.a_b_gears to "2-3".
The entity_id (switch.xxxx_a_b_gears) varies by device. For mine, it’s switch.xiaomi_mj1_3814_a_b_gears. Check your entity in "Developer Tools" > "States" and replace xxxx accordingly.
This simulates independent control of both sides, even though the device combines them into one property.
Notes
Verification: Test manually first with:
General Use: If your Xiaomi blanket has a switch.xxxx_a_b_gears entity with values like "A-B", this should work out of the box. Adjust the options in input_select to match your device’s range (mine goes up to 6).
I hope this helps others with dual-zone Xiaomi blankets! It’s a flexible workaround for devices that don’t expose separate A and B controls natively.
Special thanks to Grok from xAI for the help!
Beta Was this translation helpful? Give feedback.
All reactions