mirror of
https://github.com/esphome/esphome.git
synced 2025-10-31 23:21:54 +00:00
fix template regression
This commit is contained in:
@@ -7,9 +7,11 @@ namespace template_ {
|
|||||||
static const char *const TAG = "template.binary_sensor";
|
static const char *const TAG = "template.binary_sensor";
|
||||||
|
|
||||||
void TemplateBinarySensor::setup() {
|
void TemplateBinarySensor::setup() {
|
||||||
if (!this->f_.has_value())
|
if (!this->f_.has_value()) {
|
||||||
this->disable_loop();
|
this->disable_loop();
|
||||||
this->loop();
|
} else {
|
||||||
|
this->loop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TemplateBinarySensor::loop() {
|
void TemplateBinarySensor::loop() {
|
||||||
|
|||||||
Reference in New Issue
Block a user