1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-28 08:02:23 +01:00

bot comments

This commit is contained in:
J. Nick Koston
2025-09-26 09:46:38 -05:00
parent fb3ce6c783
commit 70685f2939

View File

@@ -20,6 +20,9 @@ namespace esp32_ble_server_automations {
using namespace esp32_ble;
using namespace event_emitter;
// Invalid listener ID constant - 0 is used as sentinel value in EventEmitter
static constexpr EventEmitterListenerID INVALID_LISTENER_ID = 0;
class BLETriggers {
public:
static Trigger<std::vector<uint8_t>, uint16_t> *create_characteristic_on_write_trigger(
@@ -50,7 +53,7 @@ class BLECharacteristicSetValueActionManager
return entry.listener_id;
}
}
return 0;
return INVALID_LISTENER_ID;
}
void emit_pre_notify(BLECharacteristic *characteristic) {
this->emit_(BLECharacteristicSetValueActionEvt::PRE_NOTIFY, characteristic);