mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 08:55:36 +00:00
[sendspin] Suppress WiFi roam scanning while playing (#17133)
This commit is contained in:
@@ -138,6 +138,7 @@ def _request_high_performance_networking(config: ConfigType) -> ConfigType:
|
||||
socket.consume_sockets(1, "sendspin_websocket_client")(config)
|
||||
|
||||
wifi.enable_runtime_power_save_control()
|
||||
wifi.enable_runtime_roaming_suppression()
|
||||
return config
|
||||
|
||||
|
||||
|
||||
@@ -129,6 +129,7 @@ void SendspinHub::on_request_high_performance() {
|
||||
#ifdef USE_WIFI
|
||||
if (wifi::global_wifi_component != nullptr) {
|
||||
wifi::global_wifi_component->request_high_performance();
|
||||
wifi::global_wifi_component->request_roaming_suppression();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -137,6 +138,7 @@ void SendspinHub::on_release_high_performance() {
|
||||
#ifdef USE_WIFI
|
||||
if (wifi::global_wifi_component != nullptr) {
|
||||
wifi::global_wifi_component->release_high_performance();
|
||||
wifi::global_wifi_component->release_roaming_suppression();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user