diff --git a/CHANGELOG.md b/CHANGELOG.md index fa7f550..2e151dd 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added ping state change logging for troubleshooting ### Changed - - Removed use of Characteristic.getValue() in preparation of homebridge 2.0 + - Removed use of Characteristic.getValue() in preparation of homebridge 2.0 (#722) + - The removal of getValue() has stopped the regular getCurrentTemperature and getCurrentHumidity calls. Changed the regualar updates to make these calls instead of just using refreshCharacteristic. (#722) ## [4.4.17 - 2024-07-17] ### Added diff --git a/accessories/aircon.js b/accessories/aircon.js index a4bd6ab..c338fe0 100755 --- a/accessories/aircon.js +++ b/accessories/aircon.js @@ -423,7 +423,7 @@ class AirConAccessory extends BroadlinkRMAccessory { device.checkTemperature(); this.updateTemperatureUI(); - if (!config.isUnitTest) {setInterval(this.updateTemperatureUI.bind(this), config.temperatureUpdateFrequency * 1000)} + if (!config.isUnitTest) {setInterval(()=>{this.getCurrentTemperature(this.updateTemperatureUI.bind(this))}, config.temperatureUpdateFrequency * 1000)} } onTemperature (temperature,humidity) { diff --git a/accessories/humidifier-dehumidifier.js b/accessories/humidifier-dehumidifier.js index c44e95b..cb2d713 100755 --- a/accessories/humidifier-dehumidifier.js +++ b/accessories/humidifier-dehumidifier.js @@ -202,7 +202,7 @@ class HumidifierDehumidifierAccessory extends FanAccessory { device.checkHumidity(); this.updateHumidityUI(); - if (!config.isUnitTest && !config.noHumidity) {setInterval(this.updateHumidityUI.bind(this), config.humidityUpdateFrequency * 1000)} + if (!config.isUnitTest && !config.noHumidity) {setInterval(()=>{this.getCurrentHumidity(this.updateHumidityUI.bind(this))}, config.humidityUpdateFrequency * 1000)} } onHumidity (temperature,humidity) {