The integrated infrared port on your device can be used to control various devices such as TVs, air conditioners,...
Utilizing infrared as a TV remote control on Xiaomi Mi A1 following these instructions:
Step 1: Open the remote control app.

Open the remote control app.
Step 2: Add a control.

Add a control.
Step 3: Select the device to control.

Select the device you want to control.
Step 4: Choose the brand.

Choose the brand.
Step 5: Set up the connection.

Establish the connection.
Step 6: Confirm the connection.

Confirm the connection.
Step 7: Use it as a TV remote control.

Use it as a TV remote control.
Congratulations! You have completed the setup process. Wishing you success.