Skip to content

Commit 2a52945

Browse files
authored
Update pzemac.cpp
Fake data removed.
1 parent 261e97d commit 2a52945

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

esphome/components/pzemac/pzemac.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,23 @@ void PZEMAC::on_modbus_data(const std::vector<uint8_t> &data) {
5555
if (this->voltage_sensor_ != nullptr) {
5656
if (voltage < 450) {
5757
this->voltage_sensor_->publish_state(voltage);
58-
} else {
59-
this->voltage_sensor_->publish_state(220.0f);
60-
}
58+
} /* else {
59+
this->voltage_sensor_->publish_state(220.0f);
60+
} */
6161
}
6262
if (this->current_sensor_ != nullptr) {
6363
if (current < 150) {
6464
this->current_sensor_->publish_state(current);
65-
} else {
65+
} /* else {
6666
this->current_sensor_->publish_state(1.0f);
67-
}
67+
} */
6868
}
6969
if (this->power_sensor_ != nullptr) {
7070
if (active_power < 16000) {
7171
this->power_sensor_->publish_state(active_power);
72-
} else {
72+
} /* else {
7373
this->power_sensor_->publish_state(101.0f);
74-
}
74+
} */
7575
}
7676
if (this->energy_sensor_ != nullptr) {
7777
if (this->last_energy_sensor_ == 0) {

0 commit comments

Comments
 (0)