diff --git a/esphome/components/wifi_info/text_sensor.py b/esphome/components/wifi_info/text_sensor.py index ac1c1bee05..a4da582c55 100644 --- a/esphome/components/wifi_info/text_sensor.py +++ b/esphome/components/wifi_info/text_sensor.py @@ -78,8 +78,8 @@ async def to_code(config): await setup_conf(config, CONF_BSSID) await setup_conf(config, CONF_MAC_ADDRESS) if CONF_SCAN_RESULTS in config: + await setup_conf(config, CONF_SCAN_RESULTS) wifi.request_wifi_scan_results() - await setup_conf(config, CONF_SCAN_RESULTS) await setup_conf(config, CONF_DNS_ADDRESS) if conf := config.get(CONF_IP_ADDRESS): wifi_info = await text_sensor.new_text_sensor(config[CONF_IP_ADDRESS])