purifier-card 1.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,27 @@
1
+ > # 🇺🇦 UKRAINE NEEDS YOUR HELP NOW!
2
+ >
3
+ > I'm the creator of this project and I'm Ukrainian.
4
+ >
5
+ > **My country, Ukraine, [is being invaded by the Russian Federation, right now](https://www.bbc.com/news/world-europe-60504334)**. I've fled Kyiv and now I'm safe with my family in the western part of Ukraine. At least for now.
6
+ > Russia is hitting target all over my country by ballistic missiles.
7
+ >
8
+ > **Please, save me and help to save my country!**
9
+ >
10
+ > Ukrainian National Bank opened [an account to Raise Funds for Ukraine’s Armed Forces](https://bank.gov.ua/en/news/all/natsionalniy-bank-vidkriv-spetsrahunok-dlya-zboru-koshtiv-na-potrebi-armiyi):
11
+ >
12
+ > ```
13
+ > SWIFT Code NBU: NBUA UA UX
14
+ > JP MORGAN CHASE BANK, New York
15
+ > SWIFT Code: CHASUS33
16
+ > Account: 400807238
17
+ > 383 Madison Avenue, New York, NY 10179, USA
18
+ > IBAN: UA843000010000000047330992708
19
+ > ```
20
+ >
21
+ > You can also donate to [charity supporting Ukrainian army](https://savelife.in.ua/en/donate/).
22
+ >
23
+ > **THANK YOU!**
24
+
1
25
  # Purifier Card
2
26
 
3
27
  [![npm version][npm-image]][npm-url]
@@ -69,31 +93,27 @@ stats:
69
93
  unit: '%'
70
94
  subtitle: Filter Remaining
71
95
  - attribute: motor_speed
72
- unit: RPS
96
+ unit: RPM
73
97
  subtitle: Motor Speed
74
98
  shortcuts:
75
99
  - name: Silent
76
100
  icon: 'mdi:weather-night'
77
- speed: Silent
101
+ preset_mode: Silent
78
102
  - name: 25%
79
103
  icon: 'mdi:circle-slice-2'
80
- speed: Favorite
81
- xiaomi_miio_favorite_level: 3
104
+ percentage: 25
82
105
  - name: 50%
83
106
  icon: 'mdi:circle-slice-4'
84
- speed: Favorite
85
- xiaomi_miio_favorite_level: 7
107
+ percentage: 50
86
108
  - name: 75%
87
109
  icon: 'mdi:circle-slice-6'
88
- speed: Favorite
89
- xiaomi_miio_favorite_level: 10
110
+ percentage: 50
90
111
  - name: 100%
91
112
  icon: 'mdi:circle-slice-8'
92
- speed: Favorite
93
- xiaomi_miio_favorite_level: 14
113
+ percentage: 100
94
114
  - name: Auto
95
115
  icon: 'mdi:brightness-auto'
96
- speed: Auto
116
+ preset_mode: Auto
97
117
  show_name: true
98
118
  show_state: true
99
119
  show_toolbar: true
@@ -102,20 +122,19 @@ compact_view: false
102
122
 
103
123
  Here is what every option means:
104
124
 
105
- | Name | Type | Default | Description |
106
- | ------------------ | :-------: | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
107
- | `type` | `string` | **Required** | `custom:purifier-card` |
108
- | `entity` | `string` | **Required** | An entity_id within the `fan` domain. |
109
- | `show_name` | `boolean` | `true` | Show friendly name of the purifier. |
110
- | `show_status` | `boolean` | `true` | Show status of the purifier. |
111
- | `show_speed` | `boolean` | `false` | Show speed of the purifier in the header. |
112
- | `show_preset_mode` | `boolean` | `true` | Show preset mode of the purifier in the header. |
113
- | `show_toolbar` | `boolean` | `true` | Show toolbar with shortcuts. |
114
- | `compact_view` | `boolean` | `false` | Compact view without image. |
115
- | `aqi` | `object` | Optional | Custom entity or attribute for AQI value. |
116
- | `stats` | `object` | Optional | Custom per state stats for your purifier cleaner |
117
- | `shortcuts` | `object` | Optional | Custom shortcuts for your purifier cleaner. |
118
- | `platform` | `string` | Optional | Default 'xiaomi_miio', for [Xiaomi Mi Air Purifier & Xiaomi Mi Air Humidifier Integration](https://github.com/syssi/xiaomi_airpurifier) you must specify `xiaomi_miio_airpurifier` |
125
+ | Name | Type | Default | Description |
126
+ | ------------------ | :-------: | ------------ | ------------------------------------------------ |
127
+ | `type` | `string` | **Required** | `custom:purifier-card` |
128
+ | `entity` | `string` | **Required** | An entity_id within the `fan` domain. |
129
+ | `show_name` | `boolean` | `true` | Show friendly name of the purifier. |
130
+ | `show_status` | `boolean` | `true` | Show status of the purifier. |
131
+ | `show_preset_mode` | `boolean` | `true` | Show preset mode of the purifier in the header. |
132
+ | `show_toolbar` | `boolean` | `true` | Show toolbar with shortcuts. |
133
+ | `compact_view` | `boolean` | `false` | Compact view without image. |
134
+ | `aqi` | `object` | Optional | Custom entity or attribute for AQI value. |
135
+ | `stats` | `object` | Optional | Custom per state stats for your purifier cleaner |
136
+ | `shortcuts` | `object` | Optional | Custom shortcuts for your purifier cleaner. |
137
+ | `platform` | `string` | Optional | Default `xiaomi_miio_airpurifier` |
119
138
 
120
139
  ### `aqi` object
121
140
 
@@ -138,28 +157,28 @@ You can use any attribute of purifier or even any entity by `entity_id` to displ
138
157
 
139
158
  ### `shortcuts` object
140
159
 
141
- You can define [custom scripts][ha-scripts] for custom actions or add shortcuts for switching modes and speeds via `shortcuts` option.
160
+ You can define [custom scripts][ha-scripts] for custom actions or add shortcuts for switching presets and percentages via `shortcuts` option.
142
161
 
143
- | Name | Type | Default | Description |
144
- | ---------------------------- | :------: | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
145
- | `name` | `string` | Optional | Friendly name of the shortcut, i.e. `Switch to Auto`. |
146
- | `icon` | `string` | Optional | Any icon for shortcut button. |
147
- | `service` | `string` | Optional | A service to call, i.e. `script.clean_air`. |
148
- | `service_data` | `object` | Optional | `service_data` for `service` call |
149
- | `speed` | `object` | Optional | A `speed` to switch to, i.e. `Auto`, etc |
150
- | `xiaomi_miio_favorite_level` | `object` | Optional | A [favorite level][xiaomi-miio-favorite-levels] of the operation mode `Favorite` for Xioami Air Purifiers. `speed` is required with this option |
162
+ | Name | Type | Default | Description |
163
+ | -------------- | :------: | -------- | ----------------------------------------------------------------------------------------------- |
164
+ | `name` | `string` | Optional | Friendly name of the shortcut, i.e. `Switch to Auto`. |
165
+ | `icon` | `string` | Optional | Any icon for shortcut button. |
166
+ | `service` | `string` | Optional | A service to call, i.e. `script.clean_air`. |
167
+ | `service_data` | `object` | Optional | `service_data` for `service` call |
168
+ | `percentage` | `object` | Optional | A `percentage` to switch to, i.e. `27`, etc. See `entity`'s `percentage_step` for valid values. |
169
+ | `preset_mode` | `object` | Optional | A `speed` to switch to, i.e. `Auto`, etc |
151
170
 
152
171
  The card will automatically try to figure out which one of shortcuts is currently active. The shortcut will be highlighted when:
153
172
 
154
173
  1. It's a service.
155
- 2. `entity`'s `speed` attribute is equal to `shortcut`'s `speed`.
156
- 3. `entity`'s `speed` attribute and `favorite_level` is equal to `shortcut`'s `speed` and `xiaomi_miio_favorite_level` correspondingly.
174
+ 2. `entity`'s `percentage` attribute is equal to `shortcut`'s `percentage`.
175
+ 3. `entity`'s `preset_mode` attribute is equal to `shortcut`'s `preset_mode`.
157
176
 
158
177
  ## Animations
159
178
 
160
179
  I've added an animation for this card to make it alive:
161
180
 
162
- <img src="https://user-images.githubusercontent.com/3459374/94728037-48ee7000-0368-11eb-8637-c8bbc5ffaf99.gif" width="500px">
181
+ <img src="https://raw.githubusercontent.com/denysdovhan/purifier-card/master/src/images/purifier-working.gif" width="300px">
163
182
 
164
183
  How did I make this animation? It's a long story…
165
184
 
@@ -206,8 +225,8 @@ If this card works with your air purifier, please open a PR and your model to th
206
225
  - Dyson Pure Humidify+Cool ([using Dyson integration](https://www.home-assistant.io/integrations/dyson/))
207
226
  - Winix AM90 Wi-Fi Air Purifier
208
227
  - Philips AirPurifier AC3858/50 (partially)
209
- - [_Your purifier?_][edit-readme]
210
228
  - SmartMI Air Purifier
229
+ - [_Your purifier?_][edit-readme]
211
230
 
212
231
  ## Development
213
232
 
@@ -244,7 +263,7 @@ MIT © [Denys Dovhan][denysdovhan]
244
263
 
245
264
  [home-assistant]: https://www.home-assistant.io/
246
265
  [hacs]: https://hacs.xyz
247
- [preview-image]: https://user-images.githubusercontent.com/3459374/94727372-4ccdc280-0367-11eb-8294-1e5c06a1fe93.png
266
+ [preview-image]: https://user-images.githubusercontent.com/3459374/144429511-23d91a48-e296-4d68-a46c-48f3649bdcda.png
248
267
  [latest-release]: https://github.com/denysdovhan/purifier-card/releases/latest
249
268
  [ha-scripts]: https://www.home-assistant.io/docs/scripts/
250
269
  [xiaomi-miio-favorite-levels]: https://www.home-assistant.io/integrations/xiaomi_miio/#service-xiaomi_miiofan_set_favorite_level-air-purifiers-only