Set wifi phy mode to 802.11b/g

post removed by user, its no longer exist

Pretty sure you will have to do that in a lambda using wifi_set_phy_mode

see Change Wifi standard b/g/n to make the most output power - Everything ESP8266

Well automatic change of channel in Wifi AP is always a bad idea, it generates a lot more of problems than it solves :wink:

For future reference, this config seems to do it:

esphome:
  name: ${device_name}
  min_version: 2022.10.2
  on_boot:
    priority: 300
    then:
      lambda: |-
        esp_wifi_set_protocol(WIFI_IF_STA, WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G);
2 Likes

since original post is gone and Xmister’s code snippet is not enough for it to compile (not declared values) then i found help from esphome discord and here’s snippet that compiles without extra code

esphome:
  name: ${device_name}
  min_version: 2022.10.2
  on_boot:
    priority: 300
    then:
      lambda: |-
        WiFi.setPhyMode(WIFI_PHY_MODE_11G);
1 Like

I think it’s a difference between ESP chipsets. Mine works on ESP32, and yours is on ESP8266.
I should have stated that I was working on ESP32.

Can say it works on ESP32. It’s nice to have a better wifi connection without a extra AP and good enough for low data rate.