12 #ifdef USE_ESP32_IMPROV_STATE_CALLBACK 16 #ifdef USE_BINARY_SENSOR 31 namespace esp32_improv {
33 using namespace esp32_ble_server;
38 void dump_config()
override;
40 void setup()
override;
41 void setup_characteristics();
42 void on_client_disconnect()
override;
44 float get_setup_priority()
const override;
45 void start()
override;
49 #ifdef USE_ESP32_IMPROV_STATE_CALLBACK 51 this->state_callback_.add(std::move(callback));
54 #ifdef USE_BINARY_SENSOR 70 bool should_start_{
false};
71 bool setup_complete_{
false};
73 uint32_t identify_start_{0};
75 uint32_t authorized_start_{0};
78 uint32_t wifi_timeout_{};
90 #ifdef USE_BINARY_SENSOR 99 #ifdef USE_ESP32_IMPROV_STATE_CALLBACK 103 bool status_indicator_state_{
false};
104 void set_status_indicator_state_(
bool state);
108 void send_response_(std::vector<uint8_t> &response);
109 void process_incoming_data_();
110 void on_wifi_connect_timeout_();
111 bool check_identify_();
BLECharacteristic * capabilities_
BLECharacteristic * rpc_response_
BLECharacteristic * error_
void add_on_state_callback(std::function< void(improv::State, improv::Error)> &&callback)
void set_authorized_duration(uint32_t authorized_duration)
void set_identify_duration(uint32_t identify_duration)
improv::State get_improv_state() const
wifi::WiFiAP connecting_sta_
uint32_t identify_duration_
void set_authorizer(binary_sensor::BinarySensor *authorizer)
uint32_t authorized_duration_
ESP32ImprovComponent * global_improv_component
std::vector< uint8_t > incoming_data_
void set_status_indicator(output::BinaryOutput *status_indicator)
Implementation of SPI Controller mode.
Base class for all binary_sensor-type classes.
void set_wifi_timeout(uint32_t wifi_timeout)
BLECharacteristic * status_
improv::Error get_improv_error_state() const
uint32_t get_wifi_timeout() const