Xiaomi Smartmi Fan Lovelace card for HASS/Home Assistant.
By default, the Xiaomi Miio native integration will be used.
If you have a model that's not supported by the native integration yet, this card also supports the Xiaomi Mi Smart Pedestal Fan integration.
Search for Xiaomi Smartmi Fan Card
fan-xiaomi.js
www/community/lovelace-fan-xiaomi/fan-xiaomi.js
resources:
- url: /community_plugin/lovelace-fan-xiaomi/fan-xiaomi.js
type: js
Example of Lovelace config views.cards
key
entity: fan.entity_id
name: Fan Name
type: "custom:fan-xiaomi"
platform: xiaomi_miio_airpurifier
Card attribute | Default | Description |
---|---|---|
entity_id |
- | entity_id of your fan |
type |
- | Must be custom:fan-xiaomi |
name |
- | (Optional) Fan name shown on card title |
platform |
default |
(Optional) If using Xiaomi Mi Smart Pedestal Fan integration, specify xiaomi_miio_fan . |
disable_animation |
False |
(Optional) Disable fan image and animation |
force_sleep_mode_support |
False |
(Optional) Enables Sleep button in UI which sets speed to 1% |
hide_led_button |
False |
(Optional) Hide LED toggle for supported models |
npm install
then npm run build
from the root of the repoBuild output should appear in the /dist
directory.
npm install
npm run start
to do a watch build and host the built files at http://127.0.0.1:8234/xiaomi-fan-card.js
.resources:
- url: "http://127.0.0.1:8234/xiaomi-fan-card.js"
type: module
You may need to change "127.0.0.1" to the IP of your development machine if you are developing remotely.
If your Home Assistant UI is running on https, you'll need to provide the resources via https as well. Use
npm run start -- --https
to serve via https, and switch theurl: http://127.0.0.1
above tourl: https://localhost
.
fineemb (Original author)