There was an error while loading. Please reload this page.
1 parent fb853e3 commit aaa9e99Copy full SHA for aaa9e99
1 file changed
functions/devices/vacuum.js
@@ -74,12 +74,16 @@ class Vacuum extends DefaultDevice {
74
const batteryLevel = parseInt(members[member].state) || 0;
75
state.descriptiveCapacityRemaining = 'FULL';
76
state.capacityRemaining = [{ unit: 'PERCENTAGE', rawValue: batteryLevel }];
77
- if (batteryLevel <= 15) {
+ if (batteryLevel <= 10) {
78
state.descriptiveCapacityRemaining = 'CRITICALLY_LOW';
79
- } else if (batteryLevel <= 25) {
+ } else if (batteryLevel <= 40) {
80
state.descriptiveCapacityRemaining = 'LOW';
81
} else if (batteryLevel <= 75) {
82
state.descriptiveCapacityRemaining = 'MEDIUM';
83
+ } else if (batteryLevel < 100) {
84
+ state.descriptiveCapacityRemaining = 'HIGH';
85
+ } else if (batteryLevel === 100) {
86
+ state.descriptiveCapacityRemaining = 'FULL';
87
}
88
break;
89
0 commit comments