Fix internal temperature reading on ESP32 (#1391)

The previous macro used SENS_SAR_MEAS_WAIT2_REG to identify if we have the reading capability was not working, so replacing it by a fresh one NO_INT_TEMP_READING, defined as a negation due to the fact that most of the ESP32 supports internal temperature reading.
This commit is contained in:
Florian authored and GitHub committed 2023-01-12 18:05:40 -06:00
1 parent ad97e9a677
commit 76b5e9269f
5 files changed
+8 -6

No files matched your search

+1 -1
View File
@@ -420,7 +420,7 @@ void pubMqttDiscovery() {
);
# endif
# endif
# ifdef ESP32
# if defined(ESP32) && !defined(NO_INT_TEMP_READING)
createDiscovery("sensor", //set Type
subjectSYStoMQTT, "SYS: Internal temperature", (char*)getUniqueId("tempc", "").c_str(), //set state_topic,name,uniqueId
"", "temperature", "{{ value_json.tempc }}", //set availability_topic,device_class,value_template,