[internal_temperature] ESP32-S3 needs ESP IDF V4.4.3 or higher (#4873)

Co-authored-by: Your Name <you@example.com>
This commit is contained in:
Fabian
2023-05-23 21:51:12 +02:00
committed by GitHub
parent 28b5c535ec
commit ffa5e29dab
2 changed files with 32 additions and 0 deletions
@@ -33,6 +33,10 @@ void InternalTemperatureSensor::update() {
temp_sensor_config_t tsens = TSENS_CONFIG_DEFAULT();
temp_sensor_set_config(tsens);
temp_sensor_start();
#if defined(USE_ESP32_VARIANT_ESP32S3) && (ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 4, 3))
#error \
"ESP32-S3 internal temperature sensor requires ESP IDF V4.4.3 or higher. See https://github.com/esphome/issues/issues/4271"
#endif
esp_err_t result = temp_sensor_read_celsius(&temperature);
temp_sensor_stop();
success = (result == ESP_OK);