async def action(self):
        """Helper method to call appropriate method based on device status."""
        if self.connected:
            await self.disconnect()
        elif self.paired and not self.connected:
            await self.connect()
        elif not self.paired:
            await self.pair_and_connect()
Helper method to call appropriate method based on device status.
libqtile/widget/bluetooth.py