File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
esphome/components/pzemac Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff 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 ) {
You can’t perform that action at this time.
0 commit comments