Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请求增加功能 #2

Open
sasukebinbin opened this issue Jul 4, 2021 · 5 comments
Open

请求增加功能 #2

sasukebinbin opened this issue Jul 4, 2021 · 5 comments

Comments

@sasukebinbin
Copy link

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

@aes-alienrip
Copy link

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

@sasukebinbin
Copy link
Author

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
Copy link
Author

@aes-alienrip

@aes-alienrip
Copy link

aes-alienrip commented Oct 12, 2021

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants