From 861a23d039cdc3900087958fb0586bffd790fd7c Mon Sep 17 00:00:00 2001 From: RFDarter Date: Fri, 7 Jun 2024 21:37:05 +0200 Subject: [PATCH] [datetime] Add logs on DateCall perform (#6868) --- esphome/components/datetime/date_entity.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/esphome/components/datetime/date_entity.cpp b/esphome/components/datetime/date_entity.cpp index 19399c1e59..b5bcef43af 100644 --- a/esphome/components/datetime/date_entity.cpp +++ b/esphome/components/datetime/date_entity.cpp @@ -80,6 +80,17 @@ void DateCall::validate_() { void DateCall::perform() { this->validate_(); + ESP_LOGD(TAG, "'%s' - Setting", this->parent_->get_name().c_str()); + + if (this->year_.has_value()) { + ESP_LOGD(TAG, " Year: %d", *this->year_); + } + if (this->month_.has_value()) { + ESP_LOGD(TAG, " Month: %d", *this->month_); + } + if (this->day_.has_value()) { + ESP_LOGD(TAG, " Day: %d", *this->day_); + } this->parent_->control(*this); }