ESPHome 2026.1.0-dev
Loading...
Searching...
No Matches
ble_switch.h
Go to the documentation of this file.
1#pragma once
2
7
8#ifdef USE_ESP32
9#include <esp_gattc_api.h>
10
11namespace esphome::ble_client {
12
14
16 public:
17 void dump_config() override;
18 void loop() override {}
19 void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if,
20 esp_ble_gattc_cb_param_t *param) override;
21
22 protected:
23 void write_state(bool state) override;
24};
25
26} // namespace esphome::ble_client
27#endif
void write_state(bool state) override
void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param) override
Base class for all switches.
Definition switch.h:39
bool state
The current reported state of the binary sensor.
Definition switch.h:56