Skip to content
This repository has been archived by the owner on Oct 30, 2021. It is now read-only.

Commit

Permalink
Fixed issue with support for fan speed
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Van den Abeele committed Aug 11, 2019
1 parent e46af07 commit 1b26756
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ After that an update of the state is performed every minute.

## Hardware Requirements

- A SmartThinq compatible LG airco unit (Tested with an )
- A SmartThinq compatible LG airco unit (Tested with an PC12SQ NSJ)


## Setup guide
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-lg-airco",
"version": "0.0.4",
"version": "0.0.5",
"description": "Homebridge plugin to control a Smart Thinq enabled LG airco unit. Makes use of WideQ => https://github.com/sampsyo/wideq",
"main": "src/index.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion src/lg/wideq.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module.exports.Wideq = function (country, language) {

me.paramConversion = {
getSpeedAsNumber: (speed) => {
switch (speed) {
switch (speed.value) {
case '@AC_MAIN_WIND_STRENGTH_SLOW_W':
return 12.5;
case '@AC_MAIN_WIND_STRENGTH_SLOW_LOW_W':
Expand All @@ -80,6 +80,8 @@ module.exports.Wideq = function (country, language) {
return 87.5;
case '@AC_MAIN_WIND_STRENGTH_POWER_W':
return 100;
default:
console.log('Unknown value: ' + JSON.stringify(speed, null, 4));
}
},
isOn: (state) => {
Expand Down

0 comments on commit 1b26756

Please sign in to comment.