mirror of
https://github.com/esphome/esphome.git
synced 2026-06-01 01:19:45 +08:00
[hlw8012] Change periodic sensor reading logs to LOGV (#15431)
This commit is contained in:
@@ -73,13 +73,13 @@ void HLW8012Component::update() {
|
||||
// Only read cf1 after one cycle. Apparently it's quite unstable after being changed.
|
||||
if (this->current_mode_) {
|
||||
float current = cf1_hz * this->current_multiplier_;
|
||||
ESP_LOGD(TAG, "Got power=%.1fW, current=%.1fA", power, current);
|
||||
ESP_LOGV(TAG, "Got power=%.1fW, current=%.1fA", power, current);
|
||||
if (this->current_sensor_ != nullptr) {
|
||||
this->current_sensor_->publish_state(current);
|
||||
}
|
||||
} else {
|
||||
float voltage = cf1_hz * this->voltage_multiplier_;
|
||||
ESP_LOGD(TAG, "Got power=%.1fW, voltage=%.1fV", power, voltage);
|
||||
ESP_LOGV(TAG, "Got power=%.1fW, voltage=%.1fV", power, voltage);
|
||||
if (this->voltage_sensor_ != nullptr) {
|
||||
this->voltage_sensor_->publish_state(voltage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user