Skip to content

Commit

Permalink
fix(air purifiers): update filter maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekkleszcz committed Mar 2, 2024
1 parent f582f43 commit 68d3951
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/accessories/devices/airPurifier/airPurifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,21 @@ export class AirPurifier extends ElectroluxAccessoryController {
this.platform.Characteristic.CurrentTemperature,
this.appliance.properties.reported.Temp
);

const filterLife = this.appliance.properties.reported.FilterType_1 === FilterType.ParticleFilter ?
this.appliance.properties.reported.FilterLife_1 :
this.appliance.properties.reported.FilterLife_2;

this.particleFilterService?.updateCharacteristic(
this.platform.Characteristic.FilterChangeIndication,
filterLife <= 10 ? this.platform.Characteristic.FilterChangeIndication.CHANGE_FILTER :
this.platform.Characteristic.FilterChangeIndication.FILTER_OK
);

this.particleFilterService?.updateCharacteristic(
this.platform.Characteristic.FilterLifeLevel,
filterLife
);
}

}

0 comments on commit 68d3951

Please sign in to comment.