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

Commit

Permalink
check flowsensor for tap_water_active
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDvP committed Jan 5, 2021
1 parent 087e348 commit 8ffba36
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
### Changed
- split `show values` in smaller packages (edited)
- extended length of IP/hostname from 32 to 48 chars (#676)
- check flowsensor for `tap_water_active`

### Removed
12 changes: 11 additions & 1 deletion src/devices/boiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,17 @@ void Boiler::check_active(const bool force) {
}

// check if tap water is active, bits 1 and 4 must be set
b = ((boilerState_ & 0x0A) == 0x0A);
// also check if there is a flowsensor and flow-type
static bool flowsensor = false;
if (Helpers::hasValue(wWCurFlow_) && (wWCurFlow_ > 0) && (wWType_ == 1)) {
flowsensor = true;
}
if (flowsensor) {
b = ((wWCurFlow_ > 0) && ((boilerState_ & 0x0A) == 0x0A));
} else {
b = ((boilerState_ & 0x0A) == 0x0A);
}

val = b ? EMS_VALUE_BOOL_ON : EMS_VALUE_BOOL_OFF;
if (tapwaterActive_ != val || force) {
tapwaterActive_ = val;
Expand Down

0 comments on commit 8ffba36

Please sign in to comment.