mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 06:04:01 +00:00
Reduce CPU overhead by allowing components to disable their loop() (#9089)
This commit is contained in:
@@ -14,7 +14,11 @@ static const char *const TAG = "ble_text_sensor";
|
||||
|
||||
static const std::string EMPTY = "";
|
||||
|
||||
void BLETextSensor::loop() {}
|
||||
void BLETextSensor::loop() {
|
||||
// Parent BLEClientNode has a loop() method, but this component uses
|
||||
// polling via update() and BLE callbacks so loop isn't needed
|
||||
this->disable_loop();
|
||||
}
|
||||
|
||||
void BLETextSensor::dump_config() {
|
||||
LOG_TEXT_SENSOR("", "BLE Text Sensor", this);
|
||||
|
||||
Reference in New Issue
Block a user