|
|
|
|
@ -127,7 +127,7 @@ namespace esphome
|
|
|
|
|
case MODE_CLOCK:
|
|
|
|
|
if (this->config_->clock->now().timestamp > 6000) // valid time
|
|
|
|
|
{
|
|
|
|
|
color_ = (this->mode == MODE_RAINBOW_CLOCK) ? this->config_->rainbow_color : this->text_color;
|
|
|
|
|
color_ = (this->mode == MODE_RAINBOW_CLOCK) ? this->config_->rainbow_color : this->config_->clock_color;
|
|
|
|
|
time_t ts = this->config_->clock->now().timestamp;
|
|
|
|
|
this->config_->display->strftime(xoffset + 15, yoffset, font, color_, display::TextAlign::BASELINE_CENTER, this->config_->time_fmt.c_str(),
|
|
|
|
|
this->config_->clock->now());
|
|
|
|
|
@ -148,7 +148,7 @@ namespace esphome
|
|
|
|
|
case MODE_DATE:
|
|
|
|
|
if (this->config_->clock->now().timestamp > 6000) // valid time
|
|
|
|
|
{
|
|
|
|
|
color_ = (this->mode == MODE_RAINBOW_DATE) ? this->config_->rainbow_color : this->text_color;
|
|
|
|
|
color_ = (this->mode == MODE_RAINBOW_DATE) ? this->config_->rainbow_color : this->config_->clock_color;
|
|
|
|
|
time_t ts = this->config_->clock->now().timestamp;
|
|
|
|
|
this->config_->display->strftime(xoffset + 15, yoffset, font, color_, display::TextAlign::BASELINE_CENTER, this->config_->date_fmt.c_str(),
|
|
|
|
|
this->config_->clock->now());
|
|
|
|
|
|