1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-30 09:02:17 +01:00

Implement more dump_configs (#791)

This commit is contained in:
Otto Winter
2019-10-23 14:43:41 +02:00
committed by GitHub
parent d63cd8b4cd
commit 8ff742d9ab
32 changed files with 110 additions and 29 deletions

View File

@@ -19,9 +19,9 @@ void NTC::process_(float value) {
return;
}
float lr = logf(value);
float v = this->a_ + this->b_ * lr + this->c_ * lr * lr * lr;
float temp = 1 / v - 273.15f;
double lr = log(double(value));
double v = this->a_ + this->b_ * lr + this->c_ * lr * lr * lr;
auto temp = float(1.0 / v - 273.15);
ESP_LOGD(TAG, "'%s' - Temperature: %.1f°C", this->name_.c_str(), temp);
this->publish_state(temp);