Skip to content

Commit

Permalink
Update air-purifier-3.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mouth4war authored Dec 17, 2019
1 parent bf50d9b commit 6269de5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/devices/air-purifier-3.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ module.exports = class extends AirPurifier.with(
}
);

// Favorite Level
// Favorite Fan Level
this.defineProperty(
{ did: `${id}`, siid: 10, piid: 10 },
{
Expand Down Expand Up @@ -275,12 +275,12 @@ module.exports = class extends AirPurifier.with(
const { id } = this.handle.api;
let value = parseInt(speed);

if (value < 390) {
value = 390;
if (value < 300) {
value = 300;
}

if (value > 2150) {
value = 2150;
if (value > 2300) {
value = 2300
}

return this.call('set_properties', [
Expand Down Expand Up @@ -330,7 +330,7 @@ module.exports = class extends AirPurifier.with(
]).then(() => null);
}

changeFavorite(level) {
changeFavoriteLevel(level) {
const { id } = this.handle.api;
let value = parseInt(level);

Expand Down

0 comments on commit 6269de5

Please sign in to comment.