mirror of
https://github.com/esphome/esphome.git
synced 2025-11-01 07:31:51 +00:00
try to avoid some of the ram
This commit is contained in:
@@ -378,7 +378,7 @@ async def to_code(config):
|
|||||||
# Track if any network uses Enterprise authentication
|
# Track if any network uses Enterprise authentication
|
||||||
has_eap = False
|
has_eap = False
|
||||||
|
|
||||||
# Build all WiFiAP objects as StructInitializers (not variables)
|
# Build all WiFiAP objects
|
||||||
networks = config.get(CONF_NETWORKS, [])
|
networks = config.get(CONF_NETWORKS, [])
|
||||||
if networks:
|
if networks:
|
||||||
wifi_aps = []
|
wifi_aps = []
|
||||||
@@ -386,7 +386,6 @@ async def to_code(config):
|
|||||||
if CONF_EAP in network:
|
if CONF_EAP in network:
|
||||||
has_eap = True
|
has_eap = True
|
||||||
ip_config = network.get(CONF_MANUAL_IP, config.get(CONF_MANUAL_IP))
|
ip_config = network.get(CONF_MANUAL_IP, config.get(CONF_MANUAL_IP))
|
||||||
# Create StructInitializer for each network (avoids global variables)
|
|
||||||
wifi_aps.append(wifi_network(network, WiFiAP(), ip_config))
|
wifi_aps.append(wifi_network(network, WiFiAP(), ip_config))
|
||||||
|
|
||||||
# Set all WiFi networks at once
|
# Set all WiFi networks at once
|
||||||
|
|||||||
Reference in New Issue
Block a user