From 9553161b07e91ff3052bda42720c1f8fc4d7f037 Mon Sep 17 00:00:00 2001 From: Proddy Date: Mon, 24 Apr 2023 16:50:05 +0200 Subject: [PATCH] remove force from check_active() --- src/devices/boiler.cpp | 6 +++--- src/devices/boiler.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index 2d0cbb4bb..f8b50d0dc 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -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)); diff --git a/src/devices/boiler.h b/src/devices/boiler.h index c0f81c07a..3e5988d05 100644 --- a/src/devices/boiler.h +++ b/src/devices/boiler.h @@ -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