platypush/plugins/esp/__init__.py
def soft_sleep(self, seconds: Optional[float] = None, **kwargs):
        """
        Stops execution in an attempt to enter a low power state.
        A light-sleep has full RAM and state retention. Upon wake execution is resumed from the point where the sleep
        was requested, with all subsystems operational.

        :param seconds: Sleep seconds (default: sleep until there are some PIN/RTC events to process)
        :param kwargs: Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
        """
        code = '''
import machine
machine.lightsleep({msec})
'''.format(msec=int(seconds * 1000) if seconds else '')

        return self.execute(code, wait_response=False, **kwargs).output

        Stops execution in an attempt to enter a low power state.
        A light-sleep has full RAM and state retention. Upon wake execution is resumed from the point where the sleep
        was requested, with all subsystems operational.

        :param seconds: Sleep seconds (default: sleep until there are some PIN/RTC events to process)
        :param kwargs: Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
        
Stops execution in an attempt to enter a low power state.
A light-sleep has full RAM and state retention. Upon wake execution is resumed from the point where the sleep
was requested, with all subsystems operational.
Stops execution in an attempt to enter a low power state . A light - sleep has full RAM and state retention . Upon wake execution is resumed from the point where the sleep was requested with all subsystems operational .
def soft_sleep(self, seconds: Optional[float] = None, **kwargs):
        code = '''
import machine
machine.lightsleep({msec})
'''.format(msec=int(seconds * 1000) if seconds else '')
        return self.execute(code, wait_response=False, **kwargs).output
def soft_sleep ( self , seconds : Optional [ float ] = None , ** kwargs ) : code = '''
import machine
machine.lightsleep({msec})
''' . format ( msec = int ( seconds * 1000 ) if seconds else '' ) return self . execute ( code , wait_response = False , ** kwargs ) . output
Stops execution in an attempt to enter a low power state.
Stops execution in an attempt to enter a low power state .
"""
        Stops execution in an attempt to enter a low power state.
        A light-sleep has full RAM and state retention. Upon wake execution is resumed from the point where the sleep
        was requested, with all subsystems operational.

        :param seconds: Sleep seconds (default: sleep until there are some PIN/RTC events to process)
        :param kwargs: Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
        """
self
seconds
Optional[float]
Sleep seconds (default: sleep until there are some PIN/RTC events to process)
Sleep seconds ( default : sleep until there are some PIN / RTC events to process )
kwargs
Parameters to pass to :meth:`platypush.plugins.esp.EspPlugin.execute`.
Parameters to pass to : meth : ` platypush . plugins . esp . EspPlugin . execute ` .