guerrerotook / securitas-direct-new-api

This repository contains the new securitas direct API that can be integrated in Home Assistant
Apache License 2.0
73 stars 30 forks source link

making optional the 2FA parts of the config flow #195

Closed cantupaz closed 6 months ago

cantupaz commented 6 months ago

I added an option to the setup form to make the 2FA parts optional. It doesn't seem to be needed, actually. But one day Securitas may decide to do something about it, so let's keep the code.

Did a bit of cleaning up typos as I was trying to understand the flow.

I do not have a yaml config for Securitas, so I didn't test if that part still works, so please check that it does work,

guerrerotook commented 6 months ago

Thanks for the PR @cantupaz, what do you mean that you don't have a yaml config to test this configuration? If the user has a yaml configuration that is automatically migrated to the config_flow and if the authentication fails because of the 2FA a new notification in Home Assistant will popup, so uses has two options, yaml or using the UI but at the end going to the same config entities store in HA.

Let me test this code in my development installation before I approve. I can run a debug my code and home assistant code at the same time.

cantupaz commented 6 months ago

Perdón. Se me pasó hacer el merge hasta ahora.