ESPHome 2025.5.0
Loading...
Searching...
No Matches
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
11namespace esphome {
12namespace 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
This class simplifies creating components that periodically check a state.
Definition component.h:301
void gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_t gattc_if, esp_ble_gattc_cb_param_t *param) override
void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *param) override
Base-class for all sensors.
Definition sensor.h:57
const float DATA
For components that import data from directly connected sensors like DHT.
Definition component.cpp:19
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7