iwzoo / lovelace-xiaomi-purifier

Xiaomi Purifier lovelace card with css animation
7 stars 3 forks source link

请求增加功能 #2

Open sasukebinbin opened 3 years ago

sasukebinbin commented 3 years ago

请问可以麻烦把童锁按钮加上并显示滤芯寿命吗?

aes-alienrip commented 2 years ago

I fix xiaomi miio integration issue, add both function to my fork https://github.com/aes-alienrip/lovelace-xiaomi-purifier

sasukebinbin commented 2 years ago

I fix xiaomi miio integration issue, add both function to my fork https://github.com/aes-alienrip/lovelace-xiaomi-purifier

Hi I just simply want to show simplify Chinese by editing your js file. But always not successful. I tried clear all cache, change browser, use private mode. Do you know why? Or could you help to add chs option also. Thanks

sasukebinbin commented 2 years ago

@aes-alienrip

aes-alienrip commented 2 years ago

I fix xiaomi miio integration issue, add both function to my fork https://github.com/aes-alienrip/lovelace-xiaomi-purifier

Hi I just simply want to show simplify Chinese by editing your js file. But always not successful. I tried clear all cache, change browser, use private mode. Do you know why? Or could you help to add chs option also. Thanks

I managed to find out how to use the translate option in card configuration finally, some stupid indent space and comma in original example. You can translate to chs as below easily

  type: 'custom:xiaomi-purifier'
  entity: fan.anyid
  title: name of the purifier device #optional
  dust_effect: true #optional
  new_led_mode: false #optional
  translate:
    Good: 优
    Moderate: 良
    Mild Unhealthy: 轻度污染
    Unhealthy: 中度污染
    Very Unhealthy: 重度污染
    Hazardous: 严重污染
    Air Purifier: 空气净化器
    On: 开机
    Off: 关机
    Set Preset Mode: 设置模式
    Device Turned On: 装置已开启
    Device Turned Off: 装置已关闭
    Indoor AQ: 室内空气
    Auto: 自动
    Silent: 睡眠
    Favorite: 最爱
    Filter Remaining: 滤芯剩余
    Temperature: 温度
    Humidity: 湿度
sasukebinbin commented 2 years ago

Thanks for the reply. This option was awesome. But I have managed to make it working by delete the xiaomi-purifier.js.gz I think when installed from hacs lovelace will only load the js file inside the gz file. Thanks for your excellent work again.