Fix compile error with UsermodBME280
This commit is contained in:
@@ -245,7 +245,7 @@ public:
|
|||||||
// from the UI and values read from sensor, then publish to broker
|
// from the UI and values read from sensor, then publish to broker
|
||||||
if (temperature != lastTemperature || PublishAlways)
|
if (temperature != lastTemperature || PublishAlways)
|
||||||
{
|
{
|
||||||
publishMqtt("temperature", String(temperature, TemperatureDecimals).c_str());
|
publishMqtt("temperature", String(temperature, (unsigned)TemperatureDecimals).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
lastTemperature = temperature; // Update last sensor temperature for next loop
|
lastTemperature = temperature; // Update last sensor temperature for next loop
|
||||||
@@ -258,17 +258,17 @@ public:
|
|||||||
|
|
||||||
if (humidity != lastHumidity || PublishAlways)
|
if (humidity != lastHumidity || PublishAlways)
|
||||||
{
|
{
|
||||||
publishMqtt("humidity", String(humidity, HumidityDecimals).c_str());
|
publishMqtt("humidity", String(humidity, (unsigned)HumidityDecimals).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heatIndex != lastHeatIndex || PublishAlways)
|
if (heatIndex != lastHeatIndex || PublishAlways)
|
||||||
{
|
{
|
||||||
publishMqtt("heat_index", String(heatIndex, TemperatureDecimals).c_str());
|
publishMqtt("heat_index", String(heatIndex, (unsigned)TemperatureDecimals).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dewPoint != lastDewPoint || PublishAlways)
|
if (dewPoint != lastDewPoint || PublishAlways)
|
||||||
{
|
{
|
||||||
publishMqtt("dew_point", String(dewPoint, TemperatureDecimals).c_str());
|
publishMqtt("dew_point", String(dewPoint, (unsigned)TemperatureDecimals).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
lastHumidity = humidity;
|
lastHumidity = humidity;
|
||||||
@@ -285,7 +285,7 @@ public:
|
|||||||
|
|
||||||
if (pressure != lastPressure || PublishAlways)
|
if (pressure != lastPressure || PublishAlways)
|
||||||
{
|
{
|
||||||
publishMqtt("pressure", String(pressure, PressureDecimals).c_str());
|
publishMqtt("pressure", String(pressure, (unsigned)PressureDecimals).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
lastPressure = pressure;
|
lastPressure = pressure;
|
||||||
|
|||||||
Reference in New Issue
Block a user