Skip to content

Commit

Permalink
fix: Added states for Deebot N79; including auto, spot, and edge. (#206)
Browse files Browse the repository at this point in the history
* Added states for Deebot N79; including auto, spot, and edge.

* Updated README with added support for Deebot N79.

* Added several corrections to extra states for Deebot N79.

* Fixed issue for PR based on comments from @denysdovhan

* Added offline status for Deebot N79.
  • Loading branch information
clayauld authored May 14, 2021
1 parent b0bf28c commit 5b18b3f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
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)
- Lietuvių (Lithuanian)
- [_Your language?_][add-translation]
Expand All @@ -193,7 +193,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 @@ -205,6 +205,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
- Eufy Robovac 15C Max
- Mi Robot Vacuum-Mop P
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

0 comments on commit 5b18b3f

Please sign in to comment.