temperature alert modified

This commit is contained in:
2026-05-28 12:03:27 +02:00
parent 579fc5bf61
commit 4d18a8d9f7
+4 -4
View File
@@ -276,19 +276,19 @@ void Pws2mqtt::parseData(QList<std::pair<QString, QString>> 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;
}