Skip to content

Commit

Permalink
Correctly report humidity
Browse files Browse the repository at this point in the history
* [Bug] Correctly report humidity. Was returning `0%` for all Awair devices.
  • Loading branch information
DMBlakeley committed Jan 19, 2022
1 parent 4958d75 commit 502a229
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/).

## v5.9.3
* [Bug] Correctly report humidity. Was returning `0%` for all Awair devices.

## v5.9.2
* [Housekeeping] Added explicit return types for all functions. Added explicit `return` to close all functions as appropriate.
* [Improvement] Refactored `updateAirQualityData` function for cleaner operation. Updated `axios.get` syntax.
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": false,
"displayName": "Homebridge Awair2",
"name": "homebridge-awair2",
"version": "5.9.2",
"version": "5.9.3",
"description": "HomeKit integration of Awair air quality monitor as Dynamic Platform.",
"main": "dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ class AwairPlatform implements DynamicPlatformPlugin {
break;

case 'humid': // Humidity (%)
const humidityService = accessory.getService(`${accessory.context.name} Humid`);
const humidityService = accessory.getService(`${accessory.context.name} Humidity`);
if (humidityService) {
humidityService
.updateCharacteristic(hap.Characteristic.CurrentRelativeHumidity, parseFloat(sensors[sensor]));
Expand Down

0 comments on commit 502a229

Please sign in to comment.