mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 09:44:12 +01:00
add is_ap_enabled() to the wifi component
This commit is contained in:
parent
f659af0f6a
commit
a9e3a8ae8c
2 changed files with 3 additions and 0 deletions
|
@ -193,6 +193,8 @@ void WiFiComponent::loop() {
|
||||||
WiFiComponent::WiFiComponent() { global_wifi_component = this; }
|
WiFiComponent::WiFiComponent() { global_wifi_component = this; }
|
||||||
|
|
||||||
bool WiFiComponent::has_ap() const { return this->has_ap_; }
|
bool WiFiComponent::has_ap() const { return this->has_ap_; }
|
||||||
|
bool WiFiComponent::is_ap_enabled() const { return this->ap_setup_; }
|
||||||
|
|
||||||
bool WiFiComponent::has_sta() const { return !this->sta_.empty(); }
|
bool WiFiComponent::has_sta() const { return !this->sta_.empty(); }
|
||||||
void WiFiComponent::set_fast_connect(bool fast_connect) { this->fast_connect_ = fast_connect; }
|
void WiFiComponent::set_fast_connect(bool fast_connect) { this->fast_connect_ = fast_connect; }
|
||||||
#ifdef USE_WIFI_11KV_SUPPORT
|
#ifdef USE_WIFI_11KV_SUPPORT
|
||||||
|
|
|
@ -244,6 +244,7 @@ class WiFiComponent : public Component {
|
||||||
|
|
||||||
bool has_sta() const;
|
bool has_sta() const;
|
||||||
bool has_ap() const;
|
bool has_ap() const;
|
||||||
|
bool is_ap_enabled() const;
|
||||||
|
|
||||||
#ifdef USE_WIFI_11KV_SUPPORT
|
#ifdef USE_WIFI_11KV_SUPPORT
|
||||||
void set_btm(bool btm);
|
void set_btm(bool btm);
|
||||||
|
|
Loading…
Reference in a new issue