Skip to content

Commit

Permalink
fix hotwater issue
Browse files Browse the repository at this point in the history
  • Loading branch information
HGlab01 authored Nov 25, 2021
1 parent b6c9b4e commit 88fc331
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
14 changes: 2 additions & 12 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,16 +370,6 @@ class Tado extends utils.Adapter {
};

try {
if (type == 'HOT_WATER') {
//temp range is unknown; 30-80 is best guess
if (temperature < 30) {
this.log.info(`Temperature set to 60° instead of ${temperature}° for HOT_WATER device`);
temperature = 60;
} else if (temperature > 80) {
this.log.info(`Temperature set to 60° instead of ${temperature}° for HOT_WATER device`);
temperature = 60;
}
}
if (type == 'HEATING') {
//Temp range is 5-25
if (temperature > 25) {
Expand Down Expand Up @@ -408,8 +398,8 @@ class Tado extends utils.Adapter {

if (power == 'ON') {
config.setting.power = 'ON';
//Temperature not for aircondition if mode is DRY, AUTO, FAN
if (!(type == 'AIR_CONDITIONING' && (mode == 'DRY' || mode == 'AUTO' || mode == 'FAN'))) {
//Temperature not for aircondition if mode is DRY, AUTO, FAN and not for HOT_WATER
if (!(type == 'HOT_WATER' || (type == 'AIR_CONDITIONING' && (mode == 'DRY' || mode == 'AUTO' || mode == 'FAN')))) {
config.setting.temperature = {};
config.setting.temperature.celsius = temperature;
}
Expand Down
6 changes: 3 additions & 3 deletions 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 @@ -22,7 +22,7 @@
"dependencies": {
"@iobroker/adapter-core": "^2.4.0",
"axios": "^0.21.4",
"iobroker-jsonexplorer": "0.1.7",
"iobroker-jsonexplorer": "0.1.8",
"ping": "^0.4.1",
"simple-oauth2": "4.2.0"
},
Expand Down

0 comments on commit 88fc331

Please sign in to comment.