Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added states for Deebot N79; including auto, spot, and edge. #206

Merged
merged 6 commits into from
May 14, 2021
Merged
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
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Just search for `Vacuum Card` in plugins tab.
2. Put `vacuum-card.js` file into your `config/www` folder.
3. Add reference to `vacuum-card.js` in Lovelace. There's two way to do that:
1. **Using UI:** _Configuration_ → _Lovelace Dashboards_ → _Resources Tab_ → Click Plus button → Set _Url_ as `/local/vacuum-card.js` → Set _Resource type_ as `JavaScript Module`.
**Note:** If you do not see the Resources Tab, you will need to enable _Advanced Mode_ in your _User Profile_
**Note:** If you do not see the Resources Tab, you will need to enable _Advanced Mode_ in your _User Profile_
2. **Using YAML:** Add following code to `lovelace` section.
```yaml
resources:
Expand Down Expand Up @@ -168,7 +168,7 @@ This card supports translations. Please, help to add more translations and impro
- 한국어 (Korean)
- Suomi (Finnish)
- Català (Catalan)
- 正體中文 (Traditional Chinese)
- 正體中文 (Traditional Chinese)
- Việt Nam (Vietnamese)
- [_Your language?_][add-translation]

Expand All @@ -192,7 +192,7 @@ If this card works with your vacuum cleaner, please open a PR and your model to
- Xiaomi Mi Robot (STYJ02YM)
- Xiaomi Mi Robot 1S
- Xiaomi Mi Roborock V1 (SDJQR02RR)
- Xiaomi Mijia 1C
- Xiaomi Mijia 1C
- Roomba 675
- Roomba 960
- Roomba 981
Expand All @@ -204,6 +204,7 @@ If this card works with your vacuum cleaner, please open a PR and your model to
- Shark IQ
- Ecovacs Deebot 950
- EcoVacs Deebot OZMO T8 AIVI
- EcoVacs Deebot N79
- Eufy Robovac 30c
- Mi Robot Vacuum-Mop P
- [_Your vacuum?_][edit-readme]
Expand Down
8 changes: 6 additions & 2 deletions src/styles.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,12 @@ export default css`
margin: 30px auto 20px auto;
}

.vacuum.on,
.vacuum.cleaning,
.vacuum.on {
.vacuum.auto,
.vacuum.spot,
.vacuum.edge,
.vacuum.single_room {
animation: cleaning 5s linear infinite;
}

Expand Down Expand Up @@ -181,7 +185,7 @@ export default css`
font-size: 16px;
}

.not-available {
.not-available .offline {
text-align: center;
color: var(--text-primary-color);
font-size: 16px;
Expand Down
18 changes: 14 additions & 4 deletions src/translations/en.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
{
"status": {
"cleaning": "Cleaning",
"auto": "Automatic Cleaning",
"spot": "Spot Cleaning",
"edge": "Edge Cleaning",
"single_room": "Single Room Cleaning",
"paused": "Paused",
"idle": "Idle",
"stop": "Stopped",
"charging": "Charging",
"returning home": "Returning home",
"docked": "Docked"
"returning home": "Returning Home",
"returning": "Returning Home",
"docked": "Docked",
"unknown": "Unknown",
"offline": "Offline"
},
"source": {
"gentle": "Gentle",
"silent": "Silent",
"standard": "Standard",
"medium": "Medium",
"turbo": "Turbo"
"turbo": "Turbo",
"normal": "Normal",
"high": "High"
},
"common": {
"name": "Vacuum Card",
Expand All @@ -22,7 +32,7 @@
"pause": "Pause",
"stop": "Stop",
"return_to_base": "Dock",
"locate": "Locate vacuum",
"locate": "Locate Vacuum",
"not_available": "Vacuum is not available"
},
"error": {
Expand Down
4 changes: 4 additions & 0 deletions src/vacuum-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@ class VacuumCard extends LitElement {

switch (state) {
case 'on':
case 'auto':
case 'spot':
case 'edge':
case 'single_room':
case 'cleaning': {
return html`
<div class="toolbar">
Expand Down