custom_components/broadlinkcover/cover.py
async def auto_stop_if_necessary(self):
        """Do auto stop if necessary."""
        current_position = self.tc.current_position()
        if self.position_reached() and not self._processing_known_position:
            self.tc.stop()
            if (current_position > 0) and (current_position < 100):
                _LOGGER.debug(self._name + ': ' + 'auto_stop_if_necessary :: current_position between 1 and 99 :: calling stop command')
                await self._async_handle_command(SERVICE_STOP_COVER)
            else:
                if self._send_stop_at_ends:
                    _LOGGER.debug(self._name + ': ' + 'auto_stop_if_necessary :: send_stop_at_ends :: calling stop command')
                    await self._async_handle_command(SERVICE_STOP_COVER)
Do auto stop if necessary.
Do auto stop if necessary.
Do auto stop if necessary .
async def auto_stop_if_necessary(self):
        current_position = self.tc.current_position()
        if self.position_reached() and not self._processing_known_position:
            self.tc.stop()
            if (current_position > 0) and (current_position < 100):
                _LOGGER.debug(self._name + ': ' + 'auto_stop_if_necessary :: current_position between 1 and 99 :: calling stop command')
                await self._async_handle_command(SERVICE_STOP_COVER)
            else:
                if self._send_stop_at_ends:
                    _LOGGER.debug(self._name + ': ' + 'auto_stop_if_necessary :: send_stop_at_ends :: calling stop command')
                    await self._async_handle_command(SERVICE_STOP_COVER)
async def auto_stop_if_necessary ( self ) : current_position = self . tc . current_position ( ) if self . position_reached ( ) and not self . _processing_known_position : self . tc . stop ( ) if ( current_position > 0 ) and ( current_position < 100 ) : _LOGGER . debug ( self . _name + ': ' + 'auto_stop_if_necessary :: current_position between 1 and 99 :: calling stop command' ) await self . _async_handle_command ( SERVICE_STOP_COVER ) else : if self . _send_stop_at_ends : _LOGGER . debug ( self . _name + ': ' + 'auto_stop_if_necessary :: send_stop_at_ends :: calling stop command' ) await self . _async_handle_command ( SERVICE_STOP_COVER )
Do auto stop if necessary.
Do auto stop if necessary .
"""Do auto stop if necessary."""
self