mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
fix #595 mixer IPM pumpstatus
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
- function keys in editor: cursor, del, pos1, end. F1=help, F2=show, F10=report
|
- function keys in editor: cursor, del, pos1, end. F1=help, F2=show, F10=report
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- mixer IPM pumpstatus
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- optimized MQTT for HA to reduce mem fragmentation issues
|
- optimized MQTT for HA to reduce mem fragmentation issues
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ bool Mixer::export_values(JsonObject & json) {
|
|||||||
// returns false if empty
|
// returns false if empty
|
||||||
bool Mixer::export_values_format(uint8_t mqtt_format, JsonObject & json) {
|
bool Mixer::export_values_format(uint8_t mqtt_format, JsonObject & json) {
|
||||||
// check if there is data for the mixer unit
|
// check if there is data for the mixer unit
|
||||||
if (!Helpers::hasValue(status_)) {
|
if (this->type() == Type::NONE) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ bool Mixer::export_values_format(uint8_t mqtt_format, JsonObject & json) {
|
|||||||
json_hc["flowSetTemp"] = flowSetTemp_;
|
json_hc["flowSetTemp"] = flowSetTemp_;
|
||||||
}
|
}
|
||||||
if (Helpers::hasValue(pumpStatus_)) {
|
if (Helpers::hasValue(pumpStatus_)) {
|
||||||
char s[5];
|
char s[7];
|
||||||
json_hc["pumpStatus"] = Helpers::render_value(s, pumpStatus_, EMS_VALUE_BOOL);
|
json_hc["pumpStatus"] = Helpers::render_value(s, pumpStatus_, EMS_VALUE_BOOL);
|
||||||
}
|
}
|
||||||
if (Helpers::hasValue(status_)) {
|
if (Helpers::hasValue(status_)) {
|
||||||
@@ -274,7 +274,7 @@ bool Mixer::export_values_format(uint8_t mqtt_format, JsonObject & json) {
|
|||||||
json_hc["wwTemp"] = (float)flowTemp_ / 10;
|
json_hc["wwTemp"] = (float)flowTemp_ / 10;
|
||||||
}
|
}
|
||||||
if (Helpers::hasValue(pumpStatus_)) {
|
if (Helpers::hasValue(pumpStatus_)) {
|
||||||
char s[5];
|
char s[7];
|
||||||
json_hc["pumpStatus"] = Helpers::render_value(s, pumpStatus_, EMS_VALUE_BOOL);
|
json_hc["pumpStatus"] = Helpers::render_value(s, pumpStatus_, EMS_VALUE_BOOL);
|
||||||
}
|
}
|
||||||
if (Helpers::hasValue(status_)) {
|
if (Helpers::hasValue(status_)) {
|
||||||
@@ -316,7 +316,7 @@ void Mixer::process_IPMStatusMessage(std::shared_ptr<const Telegram> telegram) {
|
|||||||
|
|
||||||
// check if circuit is active, 0-off, 1-unmixed, 2-mixed
|
// check if circuit is active, 0-off, 1-unmixed, 2-mixed
|
||||||
uint8_t ismixed = 0;
|
uint8_t ismixed = 0;
|
||||||
changed_ |= telegram->read_value(ismixed, 0);
|
telegram->read_value(ismixed, 0);
|
||||||
if (ismixed == 0) {
|
if (ismixed == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user