Closed danekszy closed 4 years ago
Thanks for thanking your time to help, great work!
I've started this as a personal project and humidity & temp sensors were not useful for me at the moment but now that the project is public I'm sure other users will appreciate having them available.
There are some small changes that I wand you to implement before merging this:
Because the temperature and humidity sensors will be active only when the device is powered on, you should also update Characteristic.StatusActive of this new services in the updateStatusActive() method.
if (this.miotPurifier.get('power') == true) {
.....
this.temperatureService.setCharacteristic(Characteristic.StatusActive, true);
this.humidityService.setCharacteristic(Characteristic.StatusActive, true);
} else {
....
this.temperatureService.setCharacteristic(Characteristic.StatusActive, true);
this.humidityService.setCharacteristic(Characteristic.StatusActive, true);
}
I would also apreciate changing the name of the services to temperatureSensorService and humiditySensorService to better reflect their use and to keep the same naming convention as the other services.
Many thanks for the useful addition!
Hey @rgavril, thanks for taking care of that! Also, thanks for making this module in the first place. 😉 Cheers!
Adds basic functionality for temperature and humidity sensors in AP3. LMK know if there's something to be fixed here, happy to change accordingly. ;) Cheers!