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
+6
View File
@@ -98,6 +98,12 @@ void PZEM004T::write_state_(PZEM004T::PZEM004TReadState state) {
this->write_array(data);
this->read_state_ = state;
}
void PZEM004T::dump_config() {
ESP_LOGCONFIG(TAG, "PZEM004T:");
LOG_SENSOR("", "Voltage", this->voltage_sensor_);
LOG_SENSOR("", "Current", this->current_sensor_);
LOG_SENSOR("", "Power", this->power_sensor_);
}
} // namespace pzem004t
} // namespace esphome
+2
View File
@@ -17,6 +17,8 @@ class PZEM004T : public PollingComponent, public uart::UARTDevice {
void update() override;
void dump_config() override;
protected:
sensor::Sensor *voltage_sensor_;
sensor::Sensor *current_sensor_;