diff --git a/src/pws2mqtt.cpp b/src/pws2mqtt.cpp index 3ad87ba..4ef8e1f 100644 --- a/src/pws2mqtt.cpp +++ b/src/pws2mqtt.cpp @@ -276,19 +276,19 @@ void Pws2mqtt::parseData(QList> queryList) propertyList[name] = formatNotifString(propertyName[name], QByteArray::number(propertyValue)); propertiesValue[name] = propertyValue; debug (DEBUGMACRO, name + " : " + QByteArray::number(propertyValue) + " announced = " + QByteArray::number(announced[name]), DEBUG); - if (propertyValue > 35) + if (qRound(propertyValue) >= 35) { if (announced[name] != 5) { - debug(DEBUGMACRO, "Nofifying external temp > 35°C", DEBUG); + debug(DEBUGMACRO, "Nofifying external temp >= 35°C", DEBUG); notify (propertyList[name], priorityList[5]); announced[name] = 5; } - }else if (propertyValue > 27) + }else if (qRound(propertyValue) >= 27) { if (announced[name] != 4) { - debug(DEBUGMACRO, "Nofifying external temp > 27°C", DEBUG); + debug(DEBUGMACRO, "Nofifying external temp >= 27°C", DEBUG); notify (propertyList[name], priorityList[4]); announced[name] = 4; }