improve dump_config output of sensors.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
namespace esphome {
|
||||
namespace truma_inetbox {
|
||||
|
||||
static const char *const TAG = "truma_inetbox.binary_sensor";
|
||||
static const char *const TAG = "truma_inetbox.cpplus_binary_sensor";
|
||||
|
||||
void TrumaCpPlusBinarySensor::update() {
|
||||
if (this->parent_->get_lin_bus_fault() || (this->parent_->get_last_cp_plus_request() == 0)) {
|
||||
@@ -16,6 +16,6 @@ void TrumaCpPlusBinarySensor::update() {
|
||||
this->publish_state(micros() < timeout);
|
||||
}
|
||||
|
||||
void TrumaCpPlusBinarySensor::dump_config() { ESP_LOGCONFIG("", "Truma CP Plus Binary Sensor"); }
|
||||
void TrumaCpPlusBinarySensor::dump_config() { LOG_BINARY_SENSOR("", "Truma CP Plus Binary Sensor", this); }
|
||||
} // namespace truma_inetbox
|
||||
} // namespace esphome
|
||||
@@ -5,7 +5,7 @@
|
||||
namespace esphome {
|
||||
namespace truma_inetbox {
|
||||
|
||||
static const char *const TAG = "truma_inetbox.binary_sensor";
|
||||
static const char *const TAG = "truma_inetbox.heater_binary_sensor";
|
||||
|
||||
void TrumaHeaterBinarySensor::setup() {
|
||||
this->parent_->register_listener([this](const StatusFrameHeater *status_heater) {
|
||||
@@ -37,7 +37,7 @@ void TrumaHeaterBinarySensor::setup() {
|
||||
}
|
||||
|
||||
void TrumaHeaterBinarySensor::dump_config() {
|
||||
ESP_LOGCONFIG("", "Truma Heater Binary Sensor");
|
||||
LOG_BINARY_SENSOR("", "Truma Heater Binary Sensor", this);
|
||||
ESP_LOGCONFIG(TAG, " Type '%s'", enum_to_c_str(this->type_));
|
||||
}
|
||||
} // namespace truma_inetbox
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
namespace esphome {
|
||||
namespace truma_inetbox {
|
||||
|
||||
static const char *const TAG = "truma_inetbox.binary_sensor";
|
||||
static const char *const TAG = "truma_inetbox.timer_binary_sensor";
|
||||
|
||||
void TrumaTimerBinarySensor::setup() {
|
||||
this->parent_->register_listener([this](const StatusFrameTimer *status_timer) {
|
||||
@@ -26,7 +26,7 @@ void TrumaTimerBinarySensor::setup() {
|
||||
}
|
||||
|
||||
void TrumaTimerBinarySensor::dump_config() {
|
||||
ESP_LOGCONFIG("", "Truma Timer Binary Sensor");
|
||||
LOG_BINARY_SENSOR("", "Truma Timer Binary Sensor", this);
|
||||
ESP_LOGCONFIG(TAG, " Type %s", enum_to_c_str(this->type_));
|
||||
}
|
||||
} // namespace truma_inetbox
|
||||
|
||||
Reference in New Issue
Block a user