diff --git a/esphome/components/wifi_info/text_sensor.py b/esphome/components/wifi_info/text_sensor.py index 8097767d3d..0feee3d4a9 100644 --- a/esphome/components/wifi_info/text_sensor.py +++ b/esphome/components/wifi_info/text_sensor.py @@ -80,7 +80,7 @@ async def setup_conf(config, key): async def to_code(config): # Request WiFi callbacks for any sensor that needs them - if _NETWORK_INFO_KEYS & config.keys(): + if _NETWORK_INFO_KEYS.intersection(config): wifi.request_wifi_callbacks() await setup_conf(config, CONF_SSID)