mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 11:22:24 +01:00
Reduce CPU overhead by allowing components to disable their loop() (#9089)
This commit is contained in:
@@ -11,7 +11,11 @@ namespace ble_client {
|
||||
|
||||
static const char *const TAG = "ble_sensor";
|
||||
|
||||
void BLESensor::loop() {}
|
||||
void BLESensor::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 BLESensor::dump_config() {
|
||||
LOG_SENSOR("", "BLE Sensor", this);
|
||||
|
Reference in New Issue
Block a user