Support LM75 temperature sensor (#1327)

* First draft of LM75 sensor based on HTU21 sensor

* Initialise I2C on ESP8266

* Add LM75 sensor to test builds

So that it will be tested with the continuous integration
This commit is contained in:
David Furey authored and GitHub committed 2022-11-28 11:31:46 -06:00
1 parent a41a529820
commit ec96b72d96
6 files changed
+186

No files matched your search

+15
View File
@@ -554,6 +554,21 @@ void pubMqttDiscovery() {
}
# endif
# ifdef ZsensorLM75
Log.trace(F("LM75Discovery" CR));
char* LM75sensor[8] = {"sensor", "temp", "htu", "temperature", jsonTempc, "", "", "°C"};
//component type,name,availability topic,device class,value template,payload on, payload off, unit of measurement
createDiscovery(LM75sensor[0],
LM75TOPIC, LM75sensor[1], (char*)getUniqueId(LM75sensor[1], LM75sensor[2]).c_str(),
will_Topic, LM75sensor[3], LM75sensor[4],
LM75sensor[5], LM75sensor[6], LM75sensor[7],
0, "", "", true, "",
"", "", "", "", false, // device name, device manufacturer, device model, device MAC, retain
stateClassNone //State Class
);
# endif
# ifdef ZsensorAHTx0
# define AHTparametersCount 2
Log.trace(F("AHTx0Discovery" CR));