temperature alert modified
This commit is contained in:
+4
-4
@@ -276,19 +276,19 @@ void Pws2mqtt::parseData(QList<std::pair<QString, QString>> queryList)
|
|||||||
propertyList[name] = formatNotifString(propertyName[name], QByteArray::number(propertyValue));
|
propertyList[name] = formatNotifString(propertyName[name], QByteArray::number(propertyValue));
|
||||||
propertiesValue[name] = propertyValue;
|
propertiesValue[name] = propertyValue;
|
||||||
debug (DEBUGMACRO, name + " : " + QByteArray::number(propertyValue) + " announced = " + QByteArray::number(announced[name]), DEBUG);
|
debug (DEBUGMACRO, name + " : " + QByteArray::number(propertyValue) + " announced = " + QByteArray::number(announced[name]), DEBUG);
|
||||||
if (propertyValue > 35)
|
if (qRound(propertyValue) >= 35)
|
||||||
{
|
{
|
||||||
if (announced[name] != 5)
|
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]);
|
notify (propertyList[name], priorityList[5]);
|
||||||
announced[name] = 5;
|
announced[name] = 5;
|
||||||
}
|
}
|
||||||
}else if (propertyValue > 27)
|
}else if (qRound(propertyValue) >= 27)
|
||||||
{
|
{
|
||||||
if (announced[name] != 4)
|
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]);
|
notify (propertyList[name], priorityList[4]);
|
||||||
announced[name] = 4;
|
announced[name] = 4;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user