diff --git a/src/core/emsdevice.cpp b/src/core/emsdevice.cpp index d3318c401..e7cce72cd 100644 --- a/src/core/emsdevice.cpp +++ b/src/core/emsdevice.cpp @@ -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); } diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index e2435469b..b35f2e8fa 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -1145,7 +1145,7 @@ void Thermostat::process_RC300Monitor(std::shared_ptr 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 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);