ESPHome / aioesphomeapi - login with key instead of password

Hello,

I would like to connect directly to an ESPHome P1 reader from python.
I would like to use the aioesphomeapi python module.

Is there a way to use API key instead of password?

The example code has this on github:

Example configuration entry in yaml file
api:
password: ‘MyPassword’

Python code snipped to connect:
api = aioesphomeapi.APIClient(“api_test.local”, 6053, “MyPassword”)

Is there a way to use API key instead of password? like:

api = aioesphomeapi.APIClient(“p1reader-antenna.local”, 6053, “KKOxxxxxxxxxxxxKRc=”)

Thanks,
Andras

What problem are you trying to solve?

Use:

api = aioesphomeapi.APIClient(“p1reader-antenna.local”, 6053, None, noise_psk=“KKOxxxxxxxxxxxxKRc=”)

where “KKOxxxxxxxxxxxxKRc=” is your key.