fineemb / lovelace-air-filter-card Goto Github PK
View Code? Open in Web Editor NEW用于Lovelace的小米空气净化器卡片
用于Lovelace的小米空气净化器卡片
Nice work.
You can find the basic info to support various models on the home assistant documentation:
https://www.home-assistant.io/integrations/fan.xiaomi_miio/
The following is the details from my fan. I'm guessing it may just work once you accept the pending pull request.
speed_list: Auto, Silent, Favorite
speed: Silent
model: zhimi.airpurifier.mc1
temperature: 22
humidity: 43
aqi: 1
mode: silent
filter_hours_used: 532
filter_life_remaining: 84
favorite_level: 14
child_lock: false
led: true
motor_speed: 184
average_aqi: 1
learn_mode: false
extra_features: 0
turbo_mode_supported: false
button_pressed: power
buzzer: false
filter_rfid_product_id: 0:0:41:30
filter_rfid_tag: 80:5d:c1:22:b6:74:4
filter_type: anti-bacterial
illuminance: 0
friendly_name: Xiaomi Miio Device
supported_features: 1
Hello. is only 1 thing that does not work .. When I choose mode Strong I get error, change to Strong or Favorite comes the same error
`speed_list:
`Loggdetaljer (ERROR)
Logger: homeassistant.components.websocket_api.http.connection.139985340805776
Source: components/system_log/init.py:97
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 7:07:02 (1 occurrences)
Last logged: 7:07:02
not all arguments converted during string formatting
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/fan.py", line 651, in _try_command
partial(func, *args, **kwargs)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.7/site-packages/miio/airpurifier.py", line 448, in set_mode
return self.send("set_mode", [mode.value])
File "/usr/local/lib/python3.7/site-packages/miio/device.py", line 124, in send
return self._protocol.send(command, parameters, retry_count)
File "/usr/local/lib/python3.7/site-packages/miio/miioprotocol.py", line 196, in send
raise DeviceError(error)
miio.exceptions.DeviceError: {'code': -5001, 'message': 'invaild_arg'}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service`
Hi,
I want to have an Idle button on the card, but no icon was shown.
config:
type: 'custom:air-filter'
entity: fan.xiaomi_air_purifier
modes:
- Auto
- Silent
- Idle
aspect_ratio: '.6'
Information for XiaoMi Air Purifier 2:
speed_list:
- Auto
- Silent
- Favorite
- Idle
One suggestion, pressing the active button again to switch the device to Idle mode.
Can you also provide information such as:
Temperature, humidity, filter life, hours used, illumination.
Thank you.
Hello,
I see install option every time after installation too.
Probably it is error of HACS new version
BR,
Andrey
I'm using the zhimi.airpurifier.ma2. When the "strong" speed is clicked it return with"Failed to call service fan/set_speed. not all arguments converted during string formatting". However clicking the 3 dots then changing the speed to "Favourite" works fine
Can we remove animation please or have toggle to do so?
If you have 4 filters it is slowing down frontend considerably, especially on mobile. Thanks
ReferenceError: airBox is not defined air-filter-card.js:109:7
set hass air-filter-card.js:109
value hui-view.ts:63
value hui-view.ts:344
value hui-view.ts:70
r fire_event.ts:76
c create-element-base.ts:95
I think https://github.com/fineemb/lovelace-air-filter-card/blob/master/air-filter-card.js#L109 should be air instead of airBox like all the others?
Hi,
not sure since when but when air-filter-card's .js is loaded in my setup, it causes this error:
Results in breaking several parts of Lovelace UI (doesn't break frontend completely like in #8 ).
When installing this card in a clean lovelace UI using the sample provided, the entire lovelace dashboard stops rendering.
config used for the card
`type: 'custom:air-filter'
modes:
`title: Home
views:
Hello,
Ive got one xiaomi air purifier 2s and one 3 now. The problem is the model 3 has changed to use numbers instead of string in the mode.. I started to adapt the card and such but got held up with other things.
But looking at the attributes, I am not sure why you picked mode instead of speed?
anyway, here is model 3 attributes:
speed_list: Auto, Silent, Favorite, Fan
speed: Auto
model: zhimi.airpurifier.ma4
temperature: 24.1
humidity: 62
aqi: 1
mode: 0
filter_hours_used: 135
filter_life_remaining: 96
favorite_level: 14
child_lock: true
led: true
motor_speed: 390
average_aqi: 1
purify_volume: 5306
use_time: 486600
buzzer: false
led_brightness: 1
filter_rfid_product_id: 0:0:30:33
filter_rfid_tag: 80:67:b7:da:40:fa:4
filter_type: regular
fan_level: 1
friendly_name: Air purity 3
supported_features: 1
In modifying the integration, they have separated the attributes into new entities. its operation is no longer correct.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.