diff --git a/esphome/components/template/text/__init__.py b/esphome/components/template/text/__init__.py
index a82664ee15..0f228a3c6b 100644
--- a/esphome/components/template/text/__init__.py
+++ b/esphome/components/template/text/__init__.py
@@ -39,8 +39,8 @@ def validate(config):
         )
 
     with cv.prepend_path(CONF_MIN_LENGTH):
-        if config[CONF_MIN_LENGTH] >= config[CONF_MAX_LENGTH]:
-            raise cv.Invalid("min_length must be less than max_length")
+        if config[CONF_MIN_LENGTH] > config[CONF_MAX_LENGTH]:
+            raise cv.Invalid("min_length must be less than or equal to max_length")
     return config