Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
yarn.lock
yarn.lock
/.vs/slnx.sqlite
/.vs/vacuum-card/FileContentIndex
5 changes: 2 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged


36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,23 @@ shortcuts:

Here is what every option means:

| Name | Type | Default | Description |
| -------------- | :-------: | ------------ | --------------------------------------------------------------------------------------------------------- |
| `type` | `string` | **Required** | `custom:vacuum-card` |
| `entity` | `string` | **Required** | An entity_id within the `vacuum` domain. |
| `map` | `string` | Optional | An entity_id within the `camera` domain, for streaming live vacuum map. |
| `map_refresh` | `integer` | `5` | Update interval for map camera in seconds |
| `image` | `string` | `default` | Path to image of your vacuum cleaner. Better to have `png` or `svg`. |
| `show_name` | `boolean` | `true` | Show friendly name of the vacuum. |
| `show_status` | `boolean` | `true` | Show status of the vacuum. |
| `show_toolbar` | `boolean` | `true` | Show toolbar with actions. |
| `compact_view` | `boolean` | `false` | Compact view without image. |
| `stats` | `object` | Optional | Custom per state stats for your vacuum cleaner |
| `actions` | `object` | Optional | Override default actions behavior with service invocations. |
| `shortcuts` | `array` | Optional | List of shortcuts shown at the right bottom part of the card with custom actions for your vacuum cleaner. |
| Name | Type | Default | Description |
| ----------------- | :-------: | ------------ | --------------------------------------------------------------------------------------------------------- |
| `type` | `string` | **Required** | `custom:vacuum-card` |
| `entity` | `string` | **Required** | An entity_id within the `vacuum` domain. |
| `status_template` | `string` | Optional | Jinja2 template returning a value. The `value` variable represents the `entity_id` state. |
| `map` | `string` | Optional | An entity_id within the `camera` domain, for streaming live vacuum map. |
| `map_refresh` | `integer` | `5` | Update interval for map camera in seconds |
| `image` | `string` | `default` | Path to image of your vacuum cleaner. Better to have `png` or `svg`. |
| `animated` | `boolean` | `true` | Animate the image when cleaning or returning to base. |
| `show_name` | `boolean` | `true` | Show friendly name of the vacuum. |
| `show_status` | `boolean` | `true` | Show status of the vacuum. |
| `show_toolbar` | `boolean` | `true` | Show toolbar with actions. |
| `compact_view` | `boolean` | `false` | Compact view without image. |
| `stats` | `object` | Optional | Custom per state stats for your vacuum cleaner |
| `actions` | `object` | Optional | Override default actions behavior with service invocations. |
| `shortcuts` | `array` | Optional | List of shortcuts shown at the right bottom part of the card with custom actions for your vacuum cleaner. |
| `water_level` | `string` | Optional | An entity_id within the `select` domain, for showing/setting the water level of the vacuum. |

### `stats` object

Expand Down Expand Up @@ -153,6 +156,7 @@ You can defined [custom scripts][ha-scripts] for custom actions i.e cleaning spe
| `service` | `string` | Optional | A service to call, i.e. `script.clean_bedroom`. |
| `target` | `object` | Optional | A `HassServiceTarget`, to define a target for the current service call. |
| `icon` | `string` | Optional | Any icon for action button. |
| `link` | `string` | Optional | A link to navigate to instead of an action. |
| `service_data` | `object` | `service_data` for `service` call |

## Theming
Expand Down Expand Up @@ -203,6 +207,8 @@ I've added some animations for this card to make it alive. Animations are applie
| :---------------------------------: | :-----------------------------------: |
| ![Cleaning anumation][cleaning-gif] | ![Returning anumation][returning-gif] |

This can be disabled by using the "animated" attribute.

## Supported languages

This card supports translations. Please, help to add more translations and improve existing ones. Here's a list of supported languages:
Expand Down Expand Up @@ -242,7 +248,7 @@ This card relies on basic vacuum services, like `pause`, `start`, `stop`, `retur

If this card works with your vacuum cleaner, please open a PR and your model to the list.

- **Roborock** S8 (Ultra Pro), S7 (MaxV), S6 (MaxV, Pure), S5 (Max), S50, S4 (Max), E25, E4, Q5 Pro
- **Roborock** S8 (Ultra Pro), S7 (MaxV), S6 (MaxV, Pure), S5 (Max), S50, S4 (Max), E25, E4, Q5 Pro, Qrevo S
- **Mijia** Robot Vacuum Cleaner 1C (STYTJ01ZHM)
- **Xiaomi** Mi Robot (STYJ02YM), Mi Robot 1S, Mi Roborock V1 (SDJQR02RR), Mijia 1C, Mi Robot Vacuum-Mop P, Robot Vacuum E10
- **Roomba** 670, 675, 676, 960980, 981, i3, i7+, e5, S9, s9+, j7
Expand Down
5,301 changes: 5,301 additions & 0 deletions dist/vacuum-card.js

Large diffs are not rendered by default.

Loading