diff --git a/components/ehmtxv2/EHMTX.cpp b/components/ehmtxv2/EHMTX.cpp index 40f834ba..20eb2a0d 100644 --- a/components/ehmtxv2/EHMTX.cpp +++ b/components/ehmtxv2/EHMTX.cpp @@ -748,9 +748,12 @@ namespace esphome if (force) { ESP_LOGD(TAG, "force_screen: found position: %d", i); - this->queue[i]->last_time = 0.0; - this->queue[i]->endtime += this->queue[i]->screen_time_; this->next_action_time = this->get_tick(); + this->queue[i]->last_time = 0.0; + if (this->queue[i]->endtime < this->next_action_time + this->queue[i]->screen_time_) + { + this->queue[i]->endtime = this->next_action_time + this->queue[i]->screen_time_; + } ESP_LOGW(TAG, "force_screen: icon %s in mode %d", icon_name.c_str(), mode); } } @@ -839,7 +842,7 @@ namespace esphome if (this->clock->now().is_valid()) { std::string infotext; - float ts = this->get_tick(); + float ts = this->get_tick() + static_cast(EHMTXv2_SCROLL_INTERVALL); // Force remove expired queue element for (size_t i = 0; i < MAXQUEUE; i++) {