Skip to content

Commit

Permalink
Release 2.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jghaanstra committed Sep 5, 2018
1 parent e3c7bc8 commit 181cef0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion APPSTORE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ Xiaomi has recently released an update for its v1 vacuum that enabled it for the

## Changelog
### 2018-09-05 - v2.8.2
* FIX: fixed bug with return to dock action card for Xiaomi Vacuum Cleaner
* FIX: fixed bug with return to dock action card for Vacuum Cleaner
* FIX: fixed where the Vacuum Cleaner always shows as charging even thought the battery is full
* UPDATE: removed support for Philips Eyecare since there is a bug in the miio library for this device (see https://github.com/aholstenson/miio/issues/145)

### 2018-08-22 - v2.8.1
Expand Down
9 changes: 5 additions & 4 deletions drivers/mi-robot/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,13 @@ class MiRobotDevice extends Homey.Device {
clearInterval(this.pollingInterval);

this.pollingInterval = setInterval(() => {
if (this.miio.property('state') == 'charging') {
var battery = this.miio.getState('batteryLevel');
var fanspeed = this.miio.getState('fanSpeed');

if (this.miio.property('state') == 'charging' && battery !== 100) {
var onoff = false;
var state = 'charging';
} else if (this.miio.property('state') == 'docking' || this.miio.property('state') == 'full' || this.miio.property('state') == 'returning' || this.miio.property('state') == 'waiting') {
} else if (this.miio.property('state') == 'docking' || this.miio.property('state') == 'full' || this.miio.property('state') == 'returning' || this.miio.property('state') == 'waiting' || this.miio.property('state') == 'charging') {
var onoff = false;
var state = 'docked';
} else if (this.miio.property('state') == 'cleaning' || this.miio.property('state') == 'zone-cleaning') {
Expand All @@ -117,8 +120,6 @@ class MiRobotDevice extends Homey.Device {
var onoff = false;
var state = 'stopped';
}
var battery = this.miio.getState('batteryLevel');
var fanspeed = this.miio.getState('fanSpeed');

if (this.getCapabilityValue('onoff') != onoff) {
this.setCapabilityValue('onoff', onoff);
Expand Down

0 comments on commit 181cef0

Please sign in to comment.