platypush/plugins/esp/__init__.py
def wifi_connect(self, essid: str, passphrase: str, **kwargs):
        """
        Connect the device WiFi interface to the specified access point.

        :param essid: WiFi ESSID.
        :param passphrase: WiFi passphrase.
        :param kwargs: Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
        """
        code = '''
import network
import time

wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect('{essid}', '{passphrase}')

while not wlan.isconnected():
    time.sleep(1)
'''.format(essid=essid, passphrase=passphrase)

        self.execute(code, **kwargs)

        Connect the device WiFi interface to the specified access point.

        :param essid: WiFi ESSID.
        :param passphrase: WiFi passphrase.
        :param kwargs: Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
        
Connect the device WiFi interface to the specified access point.
Connect the device WiFi interface to the specified access point .
def wifi_connect(self, essid: str, passphrase: str, **kwargs):
        code = '''
import network
import time
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect('{essid}', '{passphrase}')
while not wlan.isconnected():
    time.sleep(1)
'''.format(essid=essid, passphrase=passphrase)
        self.execute(code, **kwargs)
def wifi_connect ( self , essid : str , passphrase : str , ** kwargs ) : code = '''
import network
import time

wlan = network.WLAN(network.STA_IF)
wlan.active(True)
wlan.connect('{essid}', '{passphrase}')

while not wlan.isconnected():
    time.sleep(1)
''' . format ( essid = essid , passphrase = passphrase ) self . execute ( code , ** kwargs )
Connect the device WiFi interface to the specified access point.
Connect the device WiFi interface to the specified access point .
"""
        Connect the device WiFi interface to the specified access point.

        :param essid: WiFi ESSID.
        :param passphrase: WiFi passphrase.
        :param kwargs: Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
        """
self
essid
str
None
passphrase
str
None
kwargs
Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
Parameters to pass to : meth : ` platypush . plugins . esp . EspPlugin . execute ` .