vacuum-card 1.25.1 → 2.0.0
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 +32 -16
- package/dist/vacuum-card.js +69 -74
- package/package.json +1 -1
- package/src/localize.js +1 -1
- package/src/translations/cs.json +3 -0
- package/src/translations/da.json +3 -0
- package/src/translations/de.json +3 -0
- package/src/translations/en.json +3 -0
- package/src/translations/es.json +3 -0
- package/src/translations/fr.json +3 -0
- package/src/translations/he.json +3 -0
- package/src/translations/hu.json +3 -0
- package/src/translations/it.json +3 -0
- package/src/translations/ko.json +3 -0
- package/src/translations/nb.json +3 -0
- package/src/translations/nl.json +3 -0
- package/src/translations/pl.json +3 -0
- package/src/translations/pt.json +3 -0
- package/src/translations/ro.json +58 -59
- package/src/translations/ru.json +3 -0
- package/src/translations/sv.json +3 -0
- package/src/translations/uk.json +3 -0
- package/src/vacuum-card.js +98 -30
package/README.md
CHANGED
|
@@ -58,13 +58,19 @@ This card can be configured using Lovelace UI editor.
|
|
|
58
58
|
5. Choose `entity`.
|
|
59
59
|
6. Now you should see the preview of the card!
|
|
60
60
|
|
|
61
|
-
_Sorry, no support for `actions` and `stats` in visual config yet._
|
|
61
|
+
_Sorry, no support for `actions`, `shortcuts` and `stats` in visual config yet._
|
|
62
62
|
|
|
63
63
|
Typical example of using this card in YAML config would look like this:
|
|
64
64
|
|
|
65
65
|
```yaml
|
|
66
66
|
type: 'custom:vacuum-card'
|
|
67
67
|
entity: vacuum.vacuum_cleaner
|
|
68
|
+
actions:
|
|
69
|
+
start:
|
|
70
|
+
service: xiaomi_miio.vacuum_clean_segment
|
|
71
|
+
service_data:
|
|
72
|
+
entity_id: vacuum.vacuum_cleaner
|
|
73
|
+
segments: [16, 20]
|
|
68
74
|
stats:
|
|
69
75
|
default:
|
|
70
76
|
- attribute: filter_left
|
|
@@ -86,7 +92,7 @@ stats:
|
|
|
86
92
|
- attribute: cleaning_time
|
|
87
93
|
unit: minutes
|
|
88
94
|
subtitle: Cleaning time
|
|
89
|
-
|
|
95
|
+
shortcuts:
|
|
90
96
|
- name: Clean living room
|
|
91
97
|
service: script.clean_living_room
|
|
92
98
|
icon: 'mdi:sofa'
|
|
@@ -100,19 +106,20 @@ actions:
|
|
|
100
106
|
|
|
101
107
|
Here is what every option means:
|
|
102
108
|
|
|
103
|
-
| Name | Type | Default | Description
|
|
104
|
-
| -------------- | :-------: | ------------ |
|
|
105
|
-
| `type` | `string` | **Required** | `custom:vacuum-card`
|
|
106
|
-
| `entity` | `string` | **Required** | An entity_id within the `vacuum` domain.
|
|
107
|
-
| `map` | `string` | Optional | An entity_id within the `camera` domain, for streaming live vacuum map.
|
|
108
|
-
| `map_refresh` | `integer` | `5` | Update interval for map camera in seconds
|
|
109
|
-
| `image` | `string` | `default` | Path to image of your vacuum cleaner. Better to have `png` or `svg`.
|
|
110
|
-
| `show_name` | `boolean` | `true` | Show friendly name of the vacuum.
|
|
111
|
-
| `show_status` | `boolean` | `true` | Show status of the vacuum.
|
|
112
|
-
| `show_toolbar` | `boolean` | `true` | Show toolbar with actions.
|
|
113
|
-
| `compact_view` | `boolean` | `false` | Compact view without image.
|
|
114
|
-
| `stats` | `object` | Optional | Custom per state stats for your vacuum cleaner
|
|
115
|
-
| `actions` | `object` | Optional |
|
|
109
|
+
| Name | Type | Default | Description |
|
|
110
|
+
| -------------- | :-------: | ------------ | --------------------------------------------------------------------------------------------------------- |
|
|
111
|
+
| `type` | `string` | **Required** | `custom:vacuum-card` |
|
|
112
|
+
| `entity` | `string` | **Required** | An entity_id within the `vacuum` domain. |
|
|
113
|
+
| `map` | `string` | Optional | An entity_id within the `camera` domain, for streaming live vacuum map. |
|
|
114
|
+
| `map_refresh` | `integer` | `5` | Update interval for map camera in seconds |
|
|
115
|
+
| `image` | `string` | `default` | Path to image of your vacuum cleaner. Better to have `png` or `svg`. |
|
|
116
|
+
| `show_name` | `boolean` | `true` | Show friendly name of the vacuum. |
|
|
117
|
+
| `show_status` | `boolean` | `true` | Show status of the vacuum. |
|
|
118
|
+
| `show_toolbar` | `boolean` | `true` | Show toolbar with actions. |
|
|
119
|
+
| `compact_view` | `boolean` | `false` | Compact view without image. |
|
|
120
|
+
| `stats` | `object` | Optional | Custom per state stats for your vacuum cleaner |
|
|
121
|
+
| `actions` | `object` | Optional | Override default actions behavior with service invocations. |
|
|
122
|
+
| `shortcuts` | `object` | Optional | List of shortcuts shown at the right bottom part of the card with custom actions for your vacuum cleaner. |
|
|
116
123
|
|
|
117
124
|
### `stats` object
|
|
118
125
|
|
|
@@ -127,7 +134,16 @@ You can use any attribute of vacuum or even any entity by `entity_id` to display
|
|
|
127
134
|
|
|
128
135
|
### `actions` object
|
|
129
136
|
|
|
130
|
-
You can defined
|
|
137
|
+
You can defined service invocations to override default actions behavior. Available actions to override are `start`, `pause`, `resume`, `stop`, `locate` and `return_to_base`.
|
|
138
|
+
|
|
139
|
+
| Name | Type | Default | Description |
|
|
140
|
+
| -------------- | :------: | --------------------------------- | ----------------------------------------------- |
|
|
141
|
+
| `service` | `string` | Optional | A service to call, i.e. `script.clean_bedroom`. |
|
|
142
|
+
| `service_data` | `object` | `service_data` for `service` call |
|
|
143
|
+
|
|
144
|
+
### `shortcuts` object
|
|
145
|
+
|
|
146
|
+
You can defined [custom scripts][ha-scripts] for custom actions i.e cleaning specific room and add them to this card with `shortcuts` option.
|
|
131
147
|
|
|
132
148
|
| Name | Type | Default | Description |
|
|
133
149
|
| -------------- | :------: | --------------------------------- | -------------------------------------------------- |
|