remove force from check_active()

This commit is contained in:
Proddy
2023-04-24 16:50:05 +02:00
parent 71e7887da3
commit 9553161b07
2 changed files with 4 additions and 4 deletions

View File

@@ -833,7 +833,7 @@ Boiler::Boiler(uint8_t device_type, int8_t device_id, uint8_t product_id, const
// Check if hot tap water or heating is active
// Values will always be posted first time as heatingActive_ and tapwaterActive_ will have values EMS_VALUE_BOOL_NOTSET
void Boiler::check_active(const bool force) {
void Boiler::check_active() {
if (!Helpers::hasValue(boilerState_)) {
return;
}
@@ -844,7 +844,7 @@ void Boiler::check_active(const bool force) {
// check if heating is active, bits 2 and 4 must be set
b = ((boilerState_ & 0x09) == 0x09);
val = b ? EMS_VALUE_BOOL_ON : EMS_VALUE_BOOL_OFF;
if (heatingActive_ != val || force) {
if (heatingActive_ != val) {
heatingActive_ = val;
char s[12];
Mqtt::queue_publish(F_(heating_active), Helpers::render_boolean(s, b));
@@ -868,7 +868,7 @@ void Boiler::check_active(const bool force) {
}
val = b ? EMS_VALUE_BOOL_ON : EMS_VALUE_BOOL_OFF;
if (tapwaterActive_ != val || force) {
if (tapwaterActive_ != val) {
tapwaterActive_ = val;
char s[12];
Mqtt::queue_publish(F_(tapwater_active), Helpers::render_boolean(s, b));

View File

@@ -35,7 +35,7 @@ class Boiler : public EMSdevice {
return (flags() & 0x0F);
}
void check_active(const bool force = false);
void check_active();
uint8_t boilerState_ = EMS_VALUE_UINT_NOTSET; // Boiler state flag - FOR INTERNAL USE