项目作者: iwzoo

项目描述 :
Xiaomi Smartfan lovelace card with css animation effects
高级语言: JavaScript
项目地址: git://github.com/iwzoo/lovelace-xiaomi-smartfan.git
创建时间: 2020-05-11T07:05:55Z
项目社区:https://github.com/iwzoo/lovelace-xiaomi-smartfan

开源协议:Apache License 2.0

下载


Xiaomi Fan Lovelace Card

hacs_badge

Xiaomi Smartmi Fan Lovelace card for HASS/Home Assistant.

  • Supports HACS installation
  • Works seamlessly with the iwzoo/xiaomi_fan integration
  • Animations of the fan are made purely with CSS
  • Hold to adjust fan speed
  • Hold to adjust oscillating angle (30, 60, 90, 120, 140) degrees
  • Translation for titles

HACS Installation

  1. Navigate to HACS
  2. Choose “Frontend”
  3. Choose “Custom repositories” from the top right button
  4. Enter “https://github.com/iwzoo/lovelace-xiaomi-smartfan“ in “Add custom repository URL”, Choose “Lovelace” for “Category”
  5. Find “Xiaomi smartfan Card (Smartmi Fan 1x)” in “Frontend” and click “Install”

Manual Installation

  1. Download smartfan-xiaomi.js
  2. Copy to www/plugins/lovelace-xiaomi-smartfan/xiaomi-smartfan.js
  3. Add the following to your Lovelace resources
    1. resources:
    2. - url: /local/lovelace-xiaomi-smartfan/xiaomi-smartfan.js
    3. type: js
  4. Add the following to your Lovelace config views.cards key
    1. - entity: fan.entity_id
    2. name: Fan Name
    3. type: 'custom:smartfan-xiaomi'
    4. translate: #optional for titles in any language
    5. Angle:
    6. Child Lock:
    7. Natrual:
    8. Off:
    9. On:
    10. Oscillate:
    11. Speed Level:
    12. Timer:
    Replace fan.entity_id with your fan’s entity_id and Fan Name with any name you’d like to name your fan with

小米风扇1x lovelace卡片

hacs_badge

HA 智米风扇 1x lovelace 卡片

  • 支持 HACS
  • 配合 iwzoo/xiaomi_fan 使用
  • 纯CSS 动画效果
  • 长按风速按钮调整风扇速度
  • 长按摆风按钮调整摆风角度(30, 60, 90, 120, 140)度
  • 支持文本多语言

HACS 安装

  1. 打开HACS
  2. 选择“前端”
  3. 右上角下拉菜单选择“自定义存储库”
  4. “添加自定义存储库URL“ 输入 “https://github.com/iwzoo/lovelace-xiaomi-smartfan“ , “类别”选择“ “Lovelace”
  5. 在前端页面找到 “Xiaomi smartfan Card (Smartmi Fan 1x)” 点击 “安装”

Manual Installation

  1. 下载 smartfan-xiaomi.js
  2. 拷贝 到 www/plugins/lovelace-xiaomi-smartfan/xiaomi-smartfan.js
  3. 在lovelace资源添加
    1. resources:
    2. - url: /local/lovelace-xiaomi-smartfan/xiaomi-smartfan.js
    3. type: js
  4. 在视图卡片内添加
    1. - entity: fan.entity_id
    2. name: Fan Name
    3. type: 'custom:smartfan-xiaomi'
    4. translate: #optional for titles in any language
    5. Angle:
    6. Child Lock:
    7. Natrual:
    8. Off:
    9. On:
    10. Oscillate:
    11. Speed Level:
    12. Timer:
    替换实际的设备id fan.entity_id 修改名称Fan Name

Preview (预览)

Credits

fineemb (Original author)

ikaruswill (forked from)

shaonianzhentan

花神