ESPHome  2024.7.0
ble_rssi_sensor.h
Go to the documentation of this file.
1 #pragma once
2 
7 
8 #ifdef USE_ESP32
9 #include <esp_gattc_api.h>
10 
11 namespace esphome {
12 namespace ble_client {
13 
15 
17  public:
18  void loop() override;
19  void update() override;
20  void dump_config() override;
21  float get_setup_priority() const override { return setup_priority::DATA; }
22 
23  void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) override;
24 
25  void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if,
26  esp_ble_gattc_cb_param_t *param) override;
27 
28  protected:
29  void get_rssi_();
30  bool should_update_{false};
31 };
32 
33 } // namespace ble_client
34 } // namespace esphome
35 #endif
const float DATA
For components that import data from directly connected sensors like DHT.
Definition: component.cpp:19
This class simplifies creating components that periodically check a state.
Definition: component.h:283
void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) 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
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
Base-class for all sensors.
Definition: sensor.h:57