Olen
Olen
After digging through some logs here, it seems like there are two different 401-messages. If I intentionally use a bad username/password, I get this: `Code: 401 - {"errorGroup": "UNAUTHORIZED","errorCode": "AUT_00004","errorMessage":...
I got one: Lots of "Finished fetching... success: True", and then: ``` 2023-08-09 13:50:07.140 DEBUG (MainThread) [custom_components.verisure] Finished fetching verisure data in 1.055 seconds (success: True) 2023-08-09 13:51:07.264 WARNING (SyncWorker_14)...
Tested the latest changes, and if I log in to verisure and change my password, HomeAssistant also asks me to log in again. ``` 2023-08-09 18:26:02.667 WARNING (SyncWorker_4) [verisure.session] Error...
The point is that there are different 401s and they should be treated differently. At least for now, it looks like "Session is expired" and "Invalid username/password/authentication method combination" should...
That only seems to be related to mfa. I have disabled mfa for the account that I use in HA, so I am not sure trusting a device is possible...
I think now that maybe that is the way to go. If "trust" can be used also without MFA. I have misunderstood something about how HA handles the different exceptions....
But does it need to be related to mfa? I don't have mfa (and are reluctant to add it as I also use that account for another script that might...
I think it can be hard to do correctly, as an email can contain many attachments, and even nested attachments, and it is hard to know which file you would...
If you use `json=event_data` instead of `data=... ` I think it will do that for you automatically.
@morkohl If you have some code ready, please submit a PR, so we can try to get it implemented.