Skip to content

Commit

Permalink
Fix for airco HEX lookup when offn off
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwi-cam committed Jun 27, 2023
1 parent baf8aac commit f464a8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Fixes 'No off HEX code found for XX' error (#615)

## [4.4.13] - 2023-06-19
### Added
Expand Down
6 changes: 5 additions & 1 deletion accessories/aircon.js
Expand Up @@ -343,7 +343,11 @@ class AirConAccessory extends BroadlinkRMAccessory {
const { defaultHeatTemperature, defaultCoolTemperature, heatTemperature } = config;

let finalTemperature = temperature;
let hexData = data[`${mode}${temperature}`];
if (mode === 'off') {
let hexData = data.off;
} else {
let hexData = data[`${mode}${temperature}`];
}

if (!hexData) {
// Mode based code not found, try mode-less
Expand Down

0 comments on commit f464a8f

Please sign in to comment.