• Stars
    star
    330
  • Rank 127,348 (Top 3 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Xiaomi Mi Smart Fan integration for Home Assistant

Xiaomi Mi Smart Pedestal Fan

GitHub actions GitHub stars GitHub forks GitHub watchers "Buy Me A Coffee"

This is a custom component for home assistant to integrate the Xiaomi Mi Smart Fan.

Please follow the instructions on Retrieving the Access Token to get the API token to use in the configuration.yaml file.

Credits: Thanks to Rytilahti for all the work.

Supported devices

Name Model Model no. Specs
Pedestal Fan Fan V2 zhimi.fan.v2
Pedestal Fan Fan V3 zhimi.fan.v3
Pedestal Fan Fan SA1 zhimi.fan.sa1
Pedestal Fan Fan ZA1 zhimi.fan.za1
Pedestal Fan Fan ZA3 zhimi.fan.za3
Pedestal Fan Fan ZA4 zhimi.fan.za4 ZLBPLDS04ZM
Smartmi Standing Fan 3 zhimi.fan.za5
Pedestal Fan Fan 1C dmaker.fan.1c
Pedestal Fan Fan P5 dmaker.fan.p5
Pedestal Fan Fan P8 dmaker.fan.p8
Pedestal Fan Fan P9 dmaker.fan.p9
Pedestal Fan Fan P10 dmaker.fan.p10
Mijia Pedestal Fan dmaker.fan.p11 BPLDS03DM 2800mAh, 24W, <=58dB
Smart Standing Fan 2 Pro dmaker.fan.p33 BPLDS03DM 2800mAh, 24W, <=58dB
Pedestal Fan Fan P15 dmaker.fan.p15
Mi Smart Standing Fan 2 dmaker.fan.p18 BPLDS02DM AC, 15W, 30.2-55.8bB
Rosou SS4 Ventilator leshow.fan.ss4

Features

Pedestal Fan

  • Power (on, off)
  • Preset modes (Level 1, Level 2, Level 3, Level 4)
  • Speed percentage (0...100)
  • Oscillate (on, off)
  • Oscillation angle (30, 60, 90, 120, 140, 150)
  • Natural mode (on, off)
  • Rotate by 5 degrees (left, right)
  • Child lock (on, off)
  • LED brightness (bright, dim, off)
  • Attributes
    • model
    • temperature (zhimi.fan.v2 and v3 only)
    • humidity (zhimi.fan.v2 and v3 only)
    • led_brightness
    • buzzer
    • child_lock
    • natural_level
    • oscillate
    • delay_off_countdown
    • speed
    • direct_speed
    • natural_speed
    • angle
    • use_time
    • ac_power
    • battery (zhimi.fan.v2 and v3 only)
    • battery_charge (zhimi.fan.v2 & v3 only)
    • button_pressed (zhimi.fan.v2 & v3 only)
    • led (zhimi.fan.v2 only)
    • battery_state (zhimi.fan.v2 only)
    • anion (zhimi.fan.za5 only)

Rosou SS4 Ventilator (leshow.fan.ss4)

  • Power (on, off)

  • Operation modes (manual, sleep, strong, natural)

  • Preset modes (Level 1, Level 2, Level 3, Level 4)

  • Speed percentage (0...100)

  • Oscillate (on, off)

  • Buzzer (on, off)

  • Delayed turn off (minutes)

  • Attributes

    • model
    • mode
    • speed
    • buzzer
    • oscillate
    • delay_off_countdown
    • error_detected

Install

You can install this custom component via HACS. Search for for 'Xiaomi Mi Smart Pedestal Fan Integration' at the integration page of HACS. Alternatively, you can install it manually by copying the custom_component folder to your Home Assistant configuration folder.

As next step you have to setup the custom component at your configuration.yaml. This custom component doesn't provide a config-flow right now. A restart of Home Assistant is required afterwards.

Setup

# configuration.yaml

fan:
  - platform: xiaomi_miio_fan
    name: Xiaomi Smart Fan
    host: 192.168.130.71
    token: b7c4a758c251955d2c24b1d9e41ce47d

Configuration variables:

  • host (Required): The IP of your fan.
  • token (Required): The API token of your fan.
  • name (Optional): The name of your fan.
  • model (Optional): The model of your device. This setting can be used to bypass the device model detection and is recommended if your device isn't always available.
  • preset_modes_override (Optional): Overrides the list of preset modes. Can be used to suppress the preset mode switches at homekit by passing an empty list (preset_modes_override: []).

Platform services

Service fan.set_percentage

Set the fan speed percentage.

Service data attribute Optional Description
entity_id yes Only act on a specific fan entity. Else targets all.
percentage no Percentage speed setting. Valid values are between 0 and 100.

Service fan.set_preset_mode

Set a preset mode.

Service data attribute Optional Description
entity_id yes Only act on a specific fan entity. Else targets all.
preset_mode no Preset mode. Valid values are Level 1, Level 2, Level 3 and Level 4.

Service fan.oscillate

Oscillates the fan.

Service data attribute Optional Description
entity_id yes Only act on a specific fan entity. Else targets all.
oscillating no Flag to turn on/off oscillation. Valid values are True and False.

Service fan.set_direction

Rotates the fan 5 degrees to the left/right.

Service data attribute Optional Description
entity_id yes Only act on a specific fan entity. Else targets all.
direction no Rotate the fan 5 degrees. Valid values are left/reverse and right/forward.

Service xiaomi_miio_fan.fan_set_oscillation_angle

Set the oscillation angle. Supported values are 30, 60, 90 and 120 degrees.

Service data attribute Optional Description
entity_id yes Only act on a specific xiaomi miio entity. Else targets all.
angle no Angle in degrees. Valid values are 30, 60, 90, 120, and 140.

Service xiaomi_miio_fan.fan_set_delay_off

Set the scheduled turn off time. Supported values are 0, 60, 120, 180, 240, 300, 360, 420, 480 minutes. When 0 is passed, delay_off is disabled.

Service data attribute Optional Description
entity_id yes Only act on a specific xiaomi miio entity. Else targets all.
delay_off_countdown no Time in minutes. Valid values are 0, 60, 120, 180, 240, 300, 240, 300, 360, 420, 480 minutes.

Service xiaomi_miio_fan.fan_set_natural_mode_on

Turn the natural mode on.

Service data attribute Optional Description
entity_id yes Only act on a specific xiaomi miio entity. Else targets all.

Service xiaomi_miio_fan.fan_set_natural_mode_off

Turn the natural mode off.

Service data attribute Optional Description
entity_id yes Only act on a specific xiaomi miio entity. Else targets all.

Service xiaomi_miio_fan.fan_set_buzzer_on

Turn the buzzer on.

Service data attribute Optional Description
entity_id yes Only act on a specific xiaomi miio entity. Else targets all.

Service xiaomi_miio_fan.fan_set_buzzer_off

Turn the buzzer off.

Service data attribute Optional Description
entity_id yes Only act on a specific xiaomi miio entity. Else targets all.

Service xiaomi_miio_fan.fan_set_child_lock_on

Turn the child lock on.

Service data attribute Optional Description
entity_id yes Only act on a specific xiaomi miio entity. Else targets all.

Service xiaomi_miio_fan.fan_set_child_lock_off

Turn the child lock off.

Service data attribute Optional Description
entity_id yes Only act on a specific xiaomi miio entity. Else targets all.

Service xiaomi_miio_fan.fan_set_led_brightness

Set the led brightness. Supported values are 0 (Bright), 1 (Dim), 2 (Off).

Service data attribute Optional Description
entity_id yes Only act on a specific xiaomi miio entity. Else targets all.
brightness no Brightness, between 0 and 2.

Service xiaomi_miio_fan.fan_set_anion_on

Turn the ionizer on.

Service data attribute Optional Description
entity_id yes Only act on a specific xiaomi miio entity. Else targets all.

Service xiaomi_miio_fan.fan_set_anion_off

Turn the ionizer off.

Service data attribute Optional Description
entity_id yes Only act on a specific xiaomi miio entity. Else targets all.

More Repositories

1

xiaomi_airpurifier

Xiaomi Mi Air Purifier and Xiaomi Mi Air Humidifier integration for Home Assistant
Python
406
star
2

xiaomi_airconditioningcompanion

Xiaomi Mi and Aqara Air Conditioning Companion integration for Home Assistant
Python
374
star
3

esphome-jk-bms

ESPHome component to monitor and control a Jikong Battery Management System (JK-BMS) via UART-TTL or BLE
C++
181
star
4

xiaomi_cooker

Xiaomi Mi Electric Rice Cooker integration for Home Assistant
Python
123
star
5

esphome-yeelight-ceiling-light

ESPHome custom firmware for some Yeelight Ceiling Lights
C++
101
star
6

xiaomi_raw

Custom component for Home Assistant to faciliate the reverse engeneering of Xiaomi MiIO devices
Python
93
star
7

esphome-pipsolar

ESPHome component to monitor and control a pipsolar inverter via RS232
85
star
8

philipslight

Xiaomi Philips Lights integration for Home Assistant
Python
62
star
9

esphome-soyosource-gtn-virtual-meter

ESPHome component to simulate the current clamp to control the Soyosource GTN1200 limiter
C++
45
star
10

esphome-jbd-bms

ESPHome component to monitor and control a Xiaoxiang Battery Management System (JBD-BMS) via UART-TTL or BLE
C++
40
star
11

homeassistant-goecharger-mqtt

go-eCharger integration for Home Assistant using the MQTT API
Python
35
star
12

es-f

|es|f| is a web based HTML frontend for esniper, a lightweight console application for sniping eBay auctions.
PHP
29
star
13

esphome-zb-gw03

ESPHome custom firmware for the ZB-GW03 zigbee gateway
29
star
14

esphome-ant-bms

ESPHome component to monitor and control a ANT-BMS via UART
C++
27
star
15

esphome-atorch-dl24

ESPHome component to monitor and control some Atorch meters via bluetooth
C++
23
star
16

esphome-seplos-bms

ESPHome component to monitor a Seplos Battery Management System (Seplos-BMS) via UART or RS485
C++
23
star
17

esphome-solax-x1-mini

ESPHome component to monitor a Solax X1 mini via RS485
C++
22
star
18

esphome-mi-desk-lamp

ESPHome custom firmware for the Xiaomi Mi Desk Lamp
21
star
19

nextbike

Nextbike integration for Home Assistant
Python
11
star
20

esphome-jnge-mppt-controller

ESPHome component to monitor and control a JN-MPPT or JN-W/S Controller via RS485
C++
8
star
21

esphome-votronic

ESPHome component to monitor votronic devices via BLE or Display Link
C++
6
star
22

esphome-smg-ii

ESPHome configuration to monitor and control a ISolar/EASUN SMG II inverter via RS232
Shell
6
star
23

esphome-evse-wallbox

ESPHome component to monitor and control a EVSE wallbox
C++
5
star
24

esphome-pace-bms

ESPHome component to monitor and control a PACE Battery Management System (PACE-BMS) via RS485 (Modbus)
Shell
5
star
25

esphome-dps

ESPHome component to monitor and control the RDTech DPS series
C++
5
star
26

esphome-virtual-can-bms

ESPHome component to emulate a SMA/Victron compatible BMS via CAN bus
C++
5
star
27

xiaomi_airqualitymonitor

Xiaomi Mi Air Quality Monitor (PM2.5) integration for Home Assistant
Python
3
star
28

xiaomi_airhumidifier

Xiaomi Mi Air Humidifier integration for Home Assistant
2
star
29

xiaomi_repeater

Xioami Mi WiFi Repeater 2 integration for Home Assistant
Python
2
star
30

esphome-basen-bms

ESPHome component to monitor a Basen Battery Management System via BLE
C++
2
star
31

htc-vision-extended-keymap

Extended keymap for the qwertz hardware keyboard of my HTC Vision
C++
1
star
32

yeelight

Yeelight integration for Home Assistant
Python
1
star
33

esphome-config-examples

A collection of various ESPHome configurations and snippets
1
star
34

esphome-total-count

Python
1
star