If a handshake session becomes invalid the device returns 403 on send and an AuthenticationError is raised which prevents a retry, however a retry would be successful. In HA this causes devices to go into reauth flow which is not necessary.
Steps to reproduce:
- Successfully add a klap device to HA
- Run
dump_devinfo on the device which for some reason invalidates the HA session.
- Device goes into reauth flow and has to be re-authenticated.
ERROR (MainThread) [kasa.klaptransport] Query failed after successful authentication
If a handshake session becomes invalid the device returns 403 on send and an
AuthenticationErroris raised which prevents a retry, however a retry would be successful. In HA this causes devices to go into reauth flow which is not necessary.Steps to reproduce:
dump_devinfoon the device which for some reason invalidates the HA session.ERROR (MainThread) [kasa.klaptransport] Query failed after successful authentication