vacuum-card 2.3.2 → 2.4.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/.eslintrc.json +1 -1
- package/.github/dependabot.yml +14 -0
- package/LICENSE.md +1 -1
- package/README.md +67 -80
- package/dist/vacuum-card.js +4 -3
- package/package.json +6 -2
- package/rollup.config.js +8 -1
- package/src/styles.css +74 -70
- package/src/translations/cs.json +56 -56
- package/src/vacuum-card-editor.js +1 -2
- package/src/vacuum-card.js +134 -131
- package/.prettierrc.json +0 -3
package/.eslintrc.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# Maintain dependencies for GitHub Actions
|
|
4
|
+
- package-ecosystem: 'github-actions'
|
|
5
|
+
directory: '/'
|
|
6
|
+
schedule:
|
|
7
|
+
interval: 'monthly'
|
|
8
|
+
|
|
9
|
+
# Maintain dependencies for npm
|
|
10
|
+
- package-ecosystem: 'npm'
|
|
11
|
+
directory: '/'
|
|
12
|
+
schedule:
|
|
13
|
+
interval: 'monthly'
|
|
14
|
+
open-pull-requests-limit: 10
|
package/LICENSE.md
CHANGED
package/README.md
CHANGED
|
@@ -1,26 +1,4 @@
|
|
|
1
|
-
|
|
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!**
|
|
1
|
+
[](https://stand-with-ukraine.pp.ua/)
|
|
24
2
|
|
|
25
3
|
# Vacuum Card
|
|
26
4
|
|
|
@@ -71,7 +49,7 @@ Just search for `Vacuum Card` in plugins tab.
|
|
|
71
49
|
```
|
|
72
50
|
4. Add `custom:vacuum-card` to Lovelace UI as any other card (using either editor or YAML configuration).
|
|
73
51
|
|
|
74
|
-
##
|
|
52
|
+
## Usage
|
|
75
53
|
|
|
76
54
|
This card can be configured using Lovelace UI editor.
|
|
77
55
|
|
|
@@ -110,9 +88,10 @@ stats:
|
|
|
110
88
|
unit: hours
|
|
111
89
|
subtitle: Sensors
|
|
112
90
|
cleaning:
|
|
113
|
-
-
|
|
114
|
-
|
|
115
|
-
subtitle:
|
|
91
|
+
- value_template: >-
|
|
92
|
+
{{ (states('sensor.vacuum_main_brush_left') | float(0) / 3600) | round(1) }}
|
|
93
|
+
subtitle: Main brush
|
|
94
|
+
unit: hours
|
|
116
95
|
- attribute: cleaning_time
|
|
117
96
|
unit: minutes
|
|
118
97
|
subtitle: Cleaning time
|
|
@@ -149,12 +128,13 @@ Here is what every option means:
|
|
|
149
128
|
|
|
150
129
|
You can use any attribute of vacuum or even any entity by `entity_id` to display by stats section:
|
|
151
130
|
|
|
152
|
-
| Name
|
|
153
|
-
|
|
|
154
|
-
| `entity_id`
|
|
155
|
-
| `attribute`
|
|
156
|
-
| `
|
|
157
|
-
| `
|
|
131
|
+
| Name | Type | Default | Description |
|
|
132
|
+
| ---------------- | :------: | -------- | ----------------------------------------------- |
|
|
133
|
+
| `entity_id` | `string` | Optional | An entity_id with state, i.e. `sensor.vacuum`. |
|
|
134
|
+
| `attribute` | `string` | Optional | Attribute name of the stat, i.e. `filter_left`. |
|
|
135
|
+
| `value_template` | `string` | Optional | Jinja2 template returning a value. |
|
|
136
|
+
| `unit` | `string` | Optional | Unit of measure, i.e. `hours`. |
|
|
137
|
+
| `subtitle` | `string` | Optional | Friendly name of the stat, i.e. `Filter`. |
|
|
158
138
|
|
|
159
139
|
### `actions` object
|
|
160
140
|
|
|
@@ -176,6 +156,46 @@ You can defined [custom scripts][ha-scripts] for custom actions i.e cleaning spe
|
|
|
176
156
|
| `icon` | `string` | Optional | Any icon for action button. |
|
|
177
157
|
| `service_data` | `object` | `service_data` for `service` call |
|
|
178
158
|
|
|
159
|
+
## Theming
|
|
160
|
+
|
|
161
|
+
This card can be styled by changing the values of these CSS properties (globally or per-card via [`card-mod`][card-mod]):
|
|
162
|
+
|
|
163
|
+
| Variable | Default value | Description |
|
|
164
|
+
| --------------------------- | ---------------------------------------------------------------- | ------------------------------------ |
|
|
165
|
+
| `--vc-background` | `var(--ha-card-background, var(--card-background-color, white))` | Background of the card |
|
|
166
|
+
| `--vc-primary-text-color` | `var(--primary-text-color)` | Vacuum name, stats values, etc |
|
|
167
|
+
| `--vc-secondary-text-color` | `var(--secondary-text-color)` | Status, stats units and titles, etc |
|
|
168
|
+
| `--vc-icon-color` | `var(--secondary-text-color)` | Colors of icons |
|
|
169
|
+
| `--vc-toolbar-background` | `var(--vc-background)` | Background of the toolbar |
|
|
170
|
+
| `--vc-toolbar-text-color` | `var(--secondary-text-color)` | Color of the toolbar texts |
|
|
171
|
+
| `--vc-toolbar-icon-color` | `var(--secondary-text-color)` | Color of the toolbar icons |
|
|
172
|
+
| `--vc-divider-color` | `var(--entities-divider-color, var(--divider-color))` | Color of dividers |
|
|
173
|
+
| `--vc-spacing` | `10px` | Paddings and margins inside the card |
|
|
174
|
+
|
|
175
|
+
### Styling via theme
|
|
176
|
+
|
|
177
|
+
Here is an example of customization via theme. Read more in the [Frontend documentation](https://www.home-assistant.io/integrations/frontend/).
|
|
178
|
+
|
|
179
|
+
```yaml
|
|
180
|
+
my-custom-theme:
|
|
181
|
+
vc-background: '#17A8F4'
|
|
182
|
+
vc-spacing: 5px
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Styling via card-mod
|
|
186
|
+
|
|
187
|
+
You can use [`card-mod`][card-mod] to customize the card on per-card basis, like this:
|
|
188
|
+
|
|
189
|
+
```yaml
|
|
190
|
+
type: 'custom:vacuum-card'
|
|
191
|
+
style: |
|
|
192
|
+
ha-card {
|
|
193
|
+
--vc-background: #17A8F4;
|
|
194
|
+
--vc-spacing: 5px;
|
|
195
|
+
}
|
|
196
|
+
...
|
|
197
|
+
```
|
|
198
|
+
|
|
179
199
|
## Animations
|
|
180
200
|
|
|
181
201
|
I've added some animations for this card to make it alive. Animations are applied only for `image` property. Here's how they look like:
|
|
@@ -221,52 +241,18 @@ This card relies on basic vacuum services, like `pause`, `start`, `stop`, `retur
|
|
|
221
241
|
|
|
222
242
|
If this card works with your vacuum cleaner, please open a PR and your model to the list.
|
|
223
243
|
|
|
224
|
-
- Roborock S7
|
|
225
|
-
-
|
|
226
|
-
- Roborock
|
|
227
|
-
-
|
|
228
|
-
-
|
|
229
|
-
-
|
|
230
|
-
-
|
|
231
|
-
-
|
|
232
|
-
-
|
|
233
|
-
-
|
|
234
|
-
-
|
|
235
|
-
-
|
|
236
|
-
- Xiaomi Mi Robot (STYJ02YM)
|
|
237
|
-
- Xiaomi Mi Robot 1S
|
|
238
|
-
- Xiaomi Mi Roborock V1 (SDJQR02RR)
|
|
239
|
-
- Xiaomi Mijia 1C
|
|
240
|
-
- Roomba 675
|
|
241
|
-
- Roomba 676
|
|
242
|
-
- Roomba 960
|
|
243
|
-
- Roomba 980
|
|
244
|
-
- Roomba 981
|
|
245
|
-
- Roomba i3
|
|
246
|
-
- Roomba i7+
|
|
247
|
-
- Roomba e5
|
|
248
|
-
- Roomba S9
|
|
249
|
-
- Braava M6
|
|
250
|
-
- Roomba s9+
|
|
251
|
-
- Roomba j7
|
|
252
|
-
- Dyson 360 Eye
|
|
253
|
-
- Neato D7
|
|
254
|
-
- Neato D6
|
|
255
|
-
- Neato D4
|
|
256
|
-
- Shark IQ
|
|
257
|
-
- Ecovacs Deebot 950
|
|
258
|
-
- EcoVacs Deebot OZMO T8 AIVI
|
|
259
|
-
- EcoVacs Deebot N79
|
|
260
|
-
- EcoVacs Deebot N8
|
|
261
|
-
- EcoVacs Deebot N8+
|
|
262
|
-
- Eufy Robovac 30c
|
|
263
|
-
- Eufy Robovac 15C Max
|
|
264
|
-
- Mi Robot Vacuum-Mop P
|
|
265
|
-
- EcoVacs T9 AIVI
|
|
266
|
-
- Dreame Z10 Pro
|
|
267
|
-
- Dreame L10 Pro
|
|
268
|
-
- Dreame D9
|
|
269
|
-
- Dreame F9
|
|
244
|
+
- **Roborock** S7, S6 (MaxV, Pure), S5 (Max), S50, S4 (Max), E25, E4
|
|
245
|
+
- **Mijia** Robot Vacuum Cleaner 1C (STYTJ01ZHM)
|
|
246
|
+
- **Xiaomi** Mi Robot (STYJ02YM), Mi Robot 1S, Mi Roborock V1 (SDJQR02RR), Mijia 1C, Mi Robot Vacuum-Mop P
|
|
247
|
+
- **Roomba** 675, 676, 960980, 981, i3, i7+, e5, S9, s9+, j7
|
|
248
|
+
- **Braava** M6
|
|
249
|
+
- **Dyson** 360 Eye
|
|
250
|
+
- **Neato** D7, D6, D4
|
|
251
|
+
- **Shark** IQ
|
|
252
|
+
- **Ecova**cs Deebot 950, Deebot OZMO T8 AIVI, Deebot N79, Deebot N8, Deebot N8+, T9 AIVI
|
|
253
|
+
- **Eufy** Robovac 30c, Robovac 15C Max
|
|
254
|
+
- **EcoVacs** T9 AIVI
|
|
255
|
+
- **Dreame** Z10 Pro, L10 Pro, D9, F9
|
|
270
256
|
- 360 S7 Pro
|
|
271
257
|
- [_Your vacuum?_][edit-readme]
|
|
272
258
|
|
|
@@ -306,12 +292,13 @@ MIT © [Denys Dovhan][denysdovhan]
|
|
|
306
292
|
|
|
307
293
|
[home-assistant]: https://www.home-assistant.io/
|
|
308
294
|
[hacs]: https://hacs.xyz
|
|
309
|
-
[preview-image]: https://user-images.githubusercontent.com/3459374/
|
|
295
|
+
[preview-image]: https://user-images.githubusercontent.com/3459374/164231294-d2c26bbd-ae34-4b41-b909-3a0ae259259e.png
|
|
310
296
|
[cleaning-gif]: https://user-images.githubusercontent.com/3459374/81119202-fa60b500-8f32-11ea-9b23-325efa93d7ab.gif
|
|
311
297
|
[returning-gif]: https://user-images.githubusercontent.com/3459374/81119452-765afd00-8f33-11ea-9dc5-9c26ba3f8c45.gif
|
|
312
298
|
[latest-release]: https://github.com/denysdovhan/vacuum-card/releases/latest
|
|
313
299
|
[ha-scripts]: https://www.home-assistant.io/docs/scripts/
|
|
314
300
|
[edit-readme]: https://github.com/denysdovhan/vacuum-card/edit/master/README.md
|
|
301
|
+
[card-mod]: https://github.com/thomasloven/lovelace-card-mod
|
|
315
302
|
[add-translation]: https://github.com/denysdovhan/vacuum-card/blob/master/CONTRIBUTING.md#how-to-add-translation
|
|
316
303
|
[macbury-smart-house]: https://macbury.github.io/SmartHouse/HomeAssistant/Vacuum/
|
|
317
304
|
[bbbenji-card]: https://gist.github.com/bbbenji/24372e423f8669b2e6713638d8f8ceb2
|