Skip to content

Commit

Permalink
Merge pull request #454 from foxthefox/2.5.2
Browse files Browse the repository at this point in the history
2.2.5.2b
  • Loading branch information
foxthefox authored Oct 7, 2023
2 parents e705d08 + 600a14b commit c4786e5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ otherwise it is more complex and individually to be parametrized.

## Changelog
### 2.5.2
* correction for komfort, absenk if receiving 253/254 for OFF/ON
* correction for komfort, absenk if receiving 253/254 for OFF/ON it will be NaN see issue #164

### 2.5.1
* correction for energy today value
Expand Down
36 changes: 11 additions & 25 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1725,10 +1725,8 @@ class Fritzdect extends utils.Adapter {
if (old.val !== parseFloat(value) / 2 || !this.config.fritz_writeonhyst) {
if (value < 57) {
newtemp = parseFloat(value) / 2;
} else if (value == 253) {
newtemp = 8;
} else {
newtemp = 32;
newtemp = NaN;
}
}
this.log.debug(
Expand Down Expand Up @@ -2728,17 +2726,11 @@ class Fritzdect extends utils.Adapter {
ack: true
});
} else {
if (device.hkr.absenk == 253) {
await this.setStateAsync('DECT_' + identifier + '.absenk', {
val: 8,
ack: true
});
} else {
await this.setStateAsync('DECT_' + identifier + '.absenk', {
val: 32,
ack: true
});
}
// Off or ON willl be NaN
await this.setStateAsync('DECT_' + identifier + '.absenk', {
val: NaN,
ack: true
});
}
} else if (key === 'komfort') {
await this.createValueState(identifier, 'komfort', 'comfort temperature', 8, 32, '°C');
Expand All @@ -2748,17 +2740,11 @@ class Fritzdect extends utils.Adapter {
ack: true
});
} else {
if (device.hkr.komfort == 253) {
await this.setStateAsync('DECT_' + identifier + '.komfort', {
val: 8,
ack: true
});
} else {
await this.setStateAsync('DECT_' + identifier + '.komfort', {
val: 32,
ack: true
});
}
// Off or ON willl be NaN
await this.setStateAsync('DECT_' + identifier + '.komfort', {
val: NaN,
ack: true
});
}
} else if (key === 'lock') {
await this.createIndicatorState(identifier, 'lock', 'Thermostat UI/API lock'); //thermostat lock 0=unlocked, 1=locked
Expand Down

0 comments on commit c4786e5

Please sign in to comment.