mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
fix maxflowtemp for convectors, coolingon as bit, nrg with decimals
This commit is contained in:
@@ -990,11 +990,11 @@ void EMSdevice::generate_values_web(JsonObject output, const bool is_dashboard)
|
||||
} else if ((dv.type == DeviceValueType::UINT16) && Helpers::hasValue(*(uint16_t *)(dv.value_p))) {
|
||||
obj["v"] = Helpers::transformNumFloat(*(uint16_t *)(dv.value_p), dv.numeric_operator, fahrenheit);
|
||||
} else if ((dv.type == DeviceValueType::UINT24) && Helpers::hasValue(*(uint32_t *)(dv.value_p))) {
|
||||
obj["v"] = dv.numeric_operator > 0 ? *(uint32_t *)(dv.value_p) / dv.numeric_operator : *(uint32_t *)(dv.value_p);
|
||||
obj["v"] = dv.numeric_operator > 0 ? Helpers::transformNumFloat(*(uint32_t *)(dv.value_p), dv.numeric_operator) : *(uint32_t *)(dv.value_p);
|
||||
} else if ((dv.type == DeviceValueType::TIME) && Helpers::hasValue(*(uint32_t *)(dv.value_p))) {
|
||||
obj["v"] = dv.numeric_operator > 0 ? *(uint32_t *)(dv.value_p) / dv.numeric_operator : *(uint32_t *)(dv.value_p);
|
||||
} else if ((dv.type == DeviceValueType::UINT32) && Helpers::hasValue(*(uint32_t *)(dv.value_p))) {
|
||||
obj["v"] = dv.numeric_operator > 0 ? *(uint32_t *)(dv.value_p) / dv.numeric_operator : *(uint32_t *)(dv.value_p);
|
||||
obj["v"] = dv.numeric_operator > 0 ? Helpers::transformNumFloat(*(uint32_t *)(dv.value_p), dv.numeric_operator) : *(uint32_t *)(dv.value_p);
|
||||
} else {
|
||||
obj["v"] = ""; // must have a value for sorting to work
|
||||
}
|
||||
@@ -1100,7 +1100,7 @@ void EMSdevice::generate_values_web_customization(JsonArray output) {
|
||||
} else if (dv.type == DeviceValueType::UINT16) {
|
||||
obj["v"] = Helpers::transformNumFloat(*(uint16_t *)(dv.value_p), dv.numeric_operator, fahrenheit);
|
||||
} else if (dv.type == DeviceValueType::UINT24 || dv.type == DeviceValueType::UINT32) {
|
||||
obj["v"] = dv.numeric_operator > 0 ? *(uint32_t *)(dv.value_p) / dv.numeric_operator : *(uint32_t *)(dv.value_p);
|
||||
obj["v"] = dv.numeric_operator > 0 ? Helpers::transformNumFloat(*(uint32_t *)(dv.value_p), dv.numeric_operator) : *(uint32_t *)(dv.value_p);
|
||||
} else if (dv.type == DeviceValueType::TIME) {
|
||||
obj["v"] = dv.numeric_operator > 0 ? *(uint32_t *)(dv.value_p) / dv.numeric_operator : *(uint32_t *)(dv.value_p);
|
||||
}
|
||||
|
||||
@@ -1145,7 +1145,7 @@ void Thermostat::process_RC300Monitor(std::shared_ptr<const Telegram> telegram)
|
||||
has_update(telegram, hc->targetflowtemp, 4);
|
||||
has_update(telegram, hc->curroominfl, 27);
|
||||
has_update(telegram, hc->currSolarInfl, 29);
|
||||
has_update(telegram, hc->coolingon, 32);
|
||||
has_bitupdate(telegram, hc->coolingon, 32, 0);
|
||||
has_update(telegram, hc->vacationmode, 18);
|
||||
|
||||
add_ha_climate(hc);
|
||||
@@ -1266,7 +1266,7 @@ void Thermostat::process_RC300Curve(std::shared_ptr<const Telegram> telegram) {
|
||||
has_enumupdate(telegram, hc->nofrostmode, 5, 1); // 1-room, 2-outdoor, 3- room & outdoor
|
||||
has_update(telegram, hc->nofrosttemp, 6);
|
||||
|
||||
if (hc->heatingtype < 2) {
|
||||
if (hc->heatingtype < 3) {
|
||||
has_update(telegram, hc->maxflowtemp, 8);
|
||||
} else {
|
||||
has_update(telegram, hc->maxflowtemp, 7);
|
||||
|
||||
Reference in New Issue
Block a user