From c38a558df833bc6197de3a9613406a417bfdf036 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 29 Oct 2025 14:26:33 -0500 Subject: [PATCH] fix template regression --- .../template/binary_sensor/template_binary_sensor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/esphome/components/template/binary_sensor/template_binary_sensor.cpp b/esphome/components/template/binary_sensor/template_binary_sensor.cpp index 25879f876d..806aed49b1 100644 --- a/esphome/components/template/binary_sensor/template_binary_sensor.cpp +++ b/esphome/components/template/binary_sensor/template_binary_sensor.cpp @@ -7,9 +7,11 @@ namespace template_ { static const char *const TAG = "template.binary_sensor"; void TemplateBinarySensor::setup() { - if (!this->f_.has_value()) + if (!this->f_.has_value()) { this->disable_loop(); - this->loop(); + } else { + this->loop(); + } } void TemplateBinarySensor::loop() {