Skip to content

Commit

Permalink
Merge branch 'beta' into PR4.4.11-2
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwi-cam committed Nov 10, 2022
2 parents 7ed70dc + 17b1133 commit a069799
Show file tree
Hide file tree
Showing 6 changed files with 8,662 additions and 794 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
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).

## [4.4.11] - 2022-06-08
### Added
- Added support for fahrenheit temperature sources #495 - set tempSourceUnits to 'F'
### Fixed
- Updated node, homebridge, ping, semver, eslint, mocha, and release-it versions
## Changed
- Adds support for 0x520b and 0x520c Devices

## [4.4.11] - 2022-06-08
### Added
- MQTT support for zigbee2mqtt (Thanks @mikicof) #467
Expand Down
7 changes: 4 additions & 3 deletions accessories/aircon.js
Expand Up @@ -423,23 +423,24 @@ class AirConAccessory extends BroadlinkRMAccessory {

onTemperature (temperature,humidity) {
const { config, host, logLevel, log, name, state } = this;
const { minTemperature, maxTemperature, temperatureAdjustment, humidityAdjustment, noHumidity } = config;
const { minTemperature, maxTemperature, temperatureAdjustment, humidityAdjustment, noHumidity, tempSourceUnits } = config;

// onTemperature is getting called twice. No known cause currently.
// This helps prevent the same temperature from being processed twice
if (Object.keys(this.temperatureCallbackQueue).length === 0) {return;}

temperature += temperatureAdjustment;
if (tempSourceUnits == 'F') {temperature = (temperature - 32) * 5/9;}
state.currentTemperature = temperature;
if(logLevel <=1) {log(`\x1b[34m[DEBUG]\x1b[0m ${name} onTemperature (${temperature})`);}
if(logLevel <=2) {log(`\x1b[36m[INFO] \x1b[0m${name} onTemperature (${temperature})`);}

if(humidity) {
if(noHumidity){
state.currentHumidity = null;
}else{
humidity += humidityAdjustment;
state.currentHumidity = humidity;
if(logLevel <=1) {log(`\x1b[34m[DEBUG]\x1b[0m ${name} onHumidity (` + humidity + `)`);}
if(logLevel <=2) {log(`\x1b[36m[INFO] \x1b[0m${name} onHumidity (` + humidity + `)`);}
}
}

Expand Down
3 changes: 2 additions & 1 deletion accessories/heater-cooler.js
Expand Up @@ -546,13 +546,14 @@ class HeaterCoolerAccessory extends BroadlinkRMAccessory {

onTemperature(temperature, humidity) {
const { config, host, log, logLevel, name, state } = this;
const { minTemperature, maxTemperature, temperatureAdjustment, humidityAdjustment, noHumidity } = config;
const { minTemperature, maxTemperature, temperatureAdjustment, humidityAdjustment, noHumidity, tempSourceUnits } = config;

// onTemperature is getting called twice. No known cause currently.
// This helps prevent the same temperature from being processed twice
if (Object.keys(this.temperatureCallbackQueue).length === 0) {return;}

temperature += temperatureAdjustment;
if (tempSourceUnits == 'F') {temperature = (temperature - 32) * 5/9;}
state.currentTemperature = temperature;
if (logLevel <= 1) {log(`\x1b[34m[DEBUG]\x1b[0m ${name} onTemperature (${temperature})`);}

Expand Down
2 changes: 1 addition & 1 deletion accessories/humidifier-dehumidifier.js
Expand Up @@ -215,7 +215,7 @@ class HumidifierDehumidifierAccessory extends FanAccessory {

humidity += humidityAdjustment;
state.currentHumidity = humidity;
if(logLevel <=1) {log(`\x1b[34m[DEBUG]\x1b[0m ${name} onHumidity (` + humidity + `)`);}
if(logLevel <=2) {log(`\x1b[36m[INFO] \x1b[0m${name} onHumidity (` + humidity + `)`);}

//Fakegato history update
//Ignore readings of exactly zero - the default no value value.
Expand Down

0 comments on commit a069799

Please sign in to comment.