make sensor address compare actually work

This commit is contained in:
Your Name 2021-05-29 22:07:47 +02:00
parent ce1f75eae3
commit dd58310fe9

View File

@ -230,7 +230,7 @@ void readOneWireSensors(bool withMQTT)
if (valid) if (valid)
{ {
Serial << "DS18S20 Temperatur " << String(buf) << " : " << temp << " °C " << endl; Serial << "DS18S20 Temperatur " << String(buf) << " : " << temp << " °C " << endl;
if (String(lipoSensorAddr.get()).compareTo(String(buf))) if (strcmp(lipoSensorAddr.get(),buf) == 0)
{ {
if (withMQTT) if (withMQTT)
{ {
@ -238,7 +238,7 @@ void readOneWireSensors(bool withMQTT)
} }
Serial << "Lipo Temperatur " << temp << " °C " << endl; Serial << "Lipo Temperatur " << temp << " °C " << endl;
} }
else if (String(waterSensorAddr.get()).compareTo(String(buf))) if (strcmp(waterSensorAddr.get(),buf) == 0)
{ {
if (withMQTT) if (withMQTT)
{ {