cover.py
def _update_scheduled_ha_state_callback(self, delay=None):
        """
        Update ha-state callback
        None: unsubscibe pending callback
        0:    update now
        > 0:  update now and setup callback after delay later
        """
        # unsubscribe outdated pending callbacks
        self._callbacks.pop('update_ha', lambda: None)()
        # Schedule callback to update ha-state at end of travel
        if delay is not None:
            # Update ha-state immediately
            _LOGGER.debug("%s update ha-state now", self._name)
            self.async_schedule_update_ha_state()
            # Schedule update ha-state later
            if delay > 0:
                _LOGGER.debug(
                    "%s setup update ha-state callback in %s seconds",
                    self.name, delay,
                )
                self._callbacks['update_ha'] = async_call_later(
                    self.hass, delay, self._async_update_ha_state
                )

        Update ha-state callback
        None: unsubscibe pending callback
        0:    update now
        > 0:  update now and setup callback after delay later
        
Update ha-state callback
None: unsubscibe pending callback
0:    update now
> 0:  update now and setup callback after delay later
Update ha - state callback None : unsubscibe pending callback 0 : update now > 0 : update now and setup callback after delay later
def _update_scheduled_ha_state_callback(self, delay=None):
        self._callbacks.pop('update_ha', lambda: None)()
        if delay is not None:
            _LOGGER.debug("%s update ha-state now", self._name)
            self.async_schedule_update_ha_state()
            if delay > 0:
                _LOGGER.debug(
                    "%s setup update ha-state callback in %s seconds",
                    self.name, delay,
                )
                self._callbacks['update_ha'] = async_call_later(
                    self.hass, delay, self._async_update_ha_state
                )
def _update_scheduled_ha_state_callback ( self , delay = None ) : self . _callbacks . pop ( 'update_ha' , lambda : None ) ( ) if delay is not None : _LOGGER . debug ( "%s update ha-state now" , self . _name ) self . async_schedule_update_ha_state ( ) if delay > 0 : _LOGGER . debug ( "%s setup update ha-state callback in %s seconds" , self . name , delay , ) self . _callbacks [ 'update_ha' ] = async_call_later ( self . hass , delay , self . _async_update_ha_state )
Update ha-state callback
None: unsubscibe pending callback
0:    update now
> 0:  update now and setup callback after delay later
Update ha - state callback None : unsubscibe pending callback 0 : update now > 0 : update now and setup callback after delay later
"""
        Update ha-state callback
        None: unsubscibe pending callback
        0:    update now
        > 0:  update now and setup callback after delay later
        """ # unsubscribe outdated pending callbacks # Schedule callback to update ha-state at end of travel # Update ha-state immediately # Schedule update ha-state later
self
delay