diff --git a/esphome/components/tm1637/tm1637.cpp b/esphome/components/tm1637/tm1637.cpp index 833e3caecd..b58cec4748 100644 --- a/esphome/components/tm1637/tm1637.cpp +++ b/esphome/components/tm1637/tm1637.cpp @@ -253,7 +253,7 @@ uint8_t TM1637Display::print(uint8_t start_pos, const char* str) { pos--; this->buffer_[pos] |= 0b10000000; } else { - if (pos >= 4) { + if (pos >= 6) { ESP_LOGE(TAG, "String is too long for the display!"); break; } diff --git a/esphome/components/tm1637/tm1637.h b/esphome/components/tm1637/tm1637.h index 91e8ba66c0..003344eae9 100644 --- a/esphome/components/tm1637/tm1637.h +++ b/esphome/components/tm1637/tm1637.h @@ -63,7 +63,7 @@ class TM1637Display : public PollingComponent { GPIOPin *clk_pin_; uint8_t intensity_; optional writer_{}; - uint8_t buffer_[4] = {0}; + uint8_t buffer_[6] = {0}; }; } // namespace tm1637