mirror of
https://github.com/esphome/esphome.git
synced 2026-10-20 04:56:48 +00:00
Log mics_5524 and sen6x entity names with get_log_name()
This commit is contained in:
@@ -35,7 +35,7 @@ void MiCS5524GasSensor::publish_ratio(float ratio, micsmath::ConversionModel mod
|
||||
micsmath::clamp_ppm(micsmath::ppm_from_power_law(this->p0_, this->p1_, ratio), this->min_ppm_, this->max_ppm_);
|
||||
}
|
||||
#endif
|
||||
ESP_LOGD(TAG, "'%s': ratio=%.4f -> %.1f ppm", this->get_name().c_str(), ratio, ppm);
|
||||
ESP_LOGD(TAG, "'%s': ratio=%.4f -> %.1f ppm", LOG_STR_ARG(this->get_log_name()), ratio, ppm);
|
||||
this->publish_state(ppm);
|
||||
}
|
||||
|
||||
|
||||
@@ -190,7 +190,7 @@ void SEN6XComponent::setup() {
|
||||
if ((entry.status == Sen6xStatus::SEN6X_STATUS_GAS_ERROR && !has_voc_nox) ||
|
||||
(entry.status == Sen6xStatus::SEN6X_STATUS_CO2_ERROR && !has_co2) ||
|
||||
(entry.status == Sen6xStatus::SEN6X_STATUS_HCHO_ERROR && !has_hcho)) {
|
||||
ESP_LOGE(TAG, "'%s' needs a variant with that feature", entry.sensor->get_name().c_str());
|
||||
ESP_LOGE(TAG, "'%s' needs a variant with that feature", LOG_STR_ARG(entry.sensor->get_log_name()));
|
||||
continue;
|
||||
}
|
||||
entry.bit = status_bit(entry.status, this->sen6x_type_);
|
||||
@@ -360,7 +360,7 @@ void SEN6XComponent::dump_config() {
|
||||
}
|
||||
if (this->ambient_pressure_source_ != nullptr) {
|
||||
ESP_LOGCONFIG(TAG, " Ambient pressure compensation source: %s",
|
||||
this->ambient_pressure_source_->get_name().c_str());
|
||||
LOG_STR_ARG(this->ambient_pressure_source_->get_log_name()));
|
||||
}
|
||||
}
|
||||
LOG_SENSOR(" ", "PM 1.0", this->pm_1_0_sensor_);
|
||||
|
||||
Reference in New Issue
Block a user