Skip to content

Commit

Permalink
Heater cooler updates status based on mode #229
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwi-cam committed Jun 16, 2021
1 parent ebeeeac commit 0dcdd7d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- Improved default allowResend logic when using preventResendHex
- Heater-Cooler now shows as Heating or Cooling depending on mode selected
### Fixed
- Fixed characteristic 'Current Temperature': characteristic was supplied illegal value when a heater-cooler reads below 10
- Fixed name not defined error when using oscillate in Heater Cooler
Expand Down
19 changes: 8 additions & 11 deletions accessories/heater-cooler.js
Original file line number Diff line number Diff line change
Expand Up @@ -432,17 +432,14 @@ class HeaterCoolerAccessory extends BroadlinkRMAccessory {
// Update homebridge and home app state to reflect the cached state of all the available
// characteristics. This ensures that UI for osciallte, fan speed, etc in the app are in
// sync with device settings
if (requestedValue === Characteristic.Active.INACTIVE) {
this.updateServiceCurrentHeaterCoolerState(Characteristic.CurrentHeaterCoolerState.INACTIVE)
} else {
if (available.swingMode) {
this.serviceManager.getCharacteristic(Characteristic.SwingMode)
.updateValue(state.swingMode)
}
if (available.rotationSpeed) {
this.serviceManager.getCharacteristic(Characteristic.RotationSpeed)
.updateValue(state.rotationSpeed)
}
this.updateServiceCurrentHeaterCoolerState();
if (available.swingMode) {
this.serviceManager.getCharacteristic(Characteristic.SwingMode)
.updateValue(state.swingMode)
}
if (available.rotationSpeed) {
this.serviceManager.getCharacteristic(Characteristic.RotationSpeed)
.updateValue(state.rotationSpeed)
}
}

Expand Down

0 comments on commit 0dcdd7d

Please sign in to comment.