Dual Button Smart Fan & Oscillation Control (Tested with Xiaomi Mi Smart Standing Fan 2 Lite)
Control your smart fan’s power, 3-stage speed settings, and horizontal oscillation using a dual-button event entity switch in Home Assistant.
Tested and verified specifically for the Xiaomi Mi Smart Standing Fan 2 Lite (Dmaker Fan 1C), but compatible with any fan and event button setup using similar entity attributes.
Features
- Button 1 (Single Press): Toggle fan power (On / Off).
- Button 1 (Double Press): Cycle fan speed across 3 stages (33% → 66% → 100% → 33%). Automatically turns on the fan if it is currently off.
- Button 1 (Long Press): Set fan speed directly to maximum (100%).
- Button 2 (Any Press): Toggle horizontal oscillation (Swing On / Off).
Supported Devices & Requirements
- Tested Fan Model: Xiaomi Mi Smart Standing Fan 2 Lite (
fan.dmaker_1c_*) - An
evententity for Button 1 (supportingmulti_press_1,multi_press_2, andlong_pressevent attributes). - An
evententity for Button 2. - A
fanentity supporting percentage speed control. - A
switchentity for fan horizontal oscillation / swing control.
Gist URL
https://gist.github.com/RoninMurat/68d35b6632058f141ddf05aebb277a97
How to Import
Click the “Import Blueprint” badge above, or copy the Gist URL directly into your Home Assistant instance under Settings > Automations & Scenes > Blueprints > Import Blueprint.