Tapo: add missing login errorcheck (#9056)

This commit is contained in:
Markus Thierolf 2023-07-22 10:24:14 +02:00 • committed by GitHub
parent 35c55f6636
commit 29db0fc472
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,6 +104,10 @@ func (d *Connection) Login() error {
return err
}
if err := d.CheckErrorCode(res.ErrorCode); err != nil {
return err
}
d.Token = res.Result.Token
deviceResponse, err := d.ExecMethod("get_device_info", false)