-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Ask for PIN in Husqvarna Automower BLE integration #135440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
d7a234e
to
86f32fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So why do we need this now and what happens to the old config entry data for people who already have this set up?
homeassistant/components/husqvarna_automower_ble/config_flow.py
Outdated
Show resolved
Hide resolved
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Oh I read the description now (bad habit lol). So I think instead of marking this a breaking change and have people setup their device again, let's create a way to update their configuration. There are 2 ways to do this and I need some more information about the PIN to know which one makes more sense:
|
Someone just told me that the PIN can be changed, so I would recommend using a reauth flow to allow the user to provide the new PIN |
0f7f606
to
6b8fb29
Compare
I have updated this to use the reauth flow and updated the tests to ensure 100% test coverage on the new flow |
Happy to test these changes if that helps. Spring is coming and my mower doesn't work until this change is merged. Would be great to have this merged for the April release! Thanks @alistair23 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were also other open comments
a32271c
to
4188264
Compare
3b9a149
to
ae5f907
Compare
homeassistant/components/husqvarna_automower_ble/config_flow.py
Outdated
Show resolved
Hide resolved
Is this still being worked on? Would love to see this in one of the next releases. |
Is there a way to cherry pick this change on a normal home assistant install? My mower doesn't work without this |
3b4af00
to
dc779c7
Compare
Simplify the config flow so that we follow the same method for both Bluetooth discovery and manual setup. This should address: home-assistant#135440 (comment) Signed-off-by: Alistair Francis <alistair@alistair23.me>
dc779c7
to
18d01e0
Compare
Simplify the config flow so that we follow the same method for both Bluetooth discovery and manual setup. This should address: home-assistant#135440 (comment) Signed-off-by: Alistair Francis <alistair@alistair23.me>
18d01e0
to
4c7c982
Compare
Simplify the config flow so that we follow the same method for both Bluetooth discovery and manual setup. This should address: home-assistant#135440 (comment) Signed-off-by: Alistair Francis <alistair@alistair23.me>
4c7c982
to
d0ce5ac
Compare
All Automowers are setup with a 4 digit PIN. Depending the the model of the Automower and the security level set on the device by the user the PIN is required at boot and when performing certain operations. The current Home Assistant integration doesn't require a PIN for certain models. It seems like higher security levels or certain models always require a PIN though. So the integration currently doesn't work for all models or configurations. As such, let's request a PIN from users when setting up the integration so that we can use that for communicating with the mower. This should make the integration more robust for a range of different models and security levels as we can send the PIN as part of the BLE setup. Fixes: home-assistant#131321 Signed-off-by: Alistair Francis <alistair@alistair23.me>
Signed-off-by: Alistair Francis <alistair@alistair23.me>
Signed-off-by: Alistair Francis <alistair@alistair23.me>
… errors Signed-off-by: Alistair Francis <alistair@alistair23.me>
Signed-off-by: Alistair Francis <alistair@alistair23.me>
Signed-off-by: Alistair Francis <alistair@alistair23.me>
Signed-off-by: Alistair Francis <alistair@alistair23.me>
Signed-off-by: Alistair Francis <alistair@alistair23.me>
Simplify the config flow so that we follow the same method for both Bluetooth discovery and manual setup. This should address: home-assistant#135440 (comment) Signed-off-by: Alistair Francis <alistair@alistair23.me>
Signed-off-by: Alistair Francis <alistair@alistair23.me>
d0ce5ac
to
b9a558a
Compare
@joostlek |
Breaking change
The integration now requires the AutoMower PIN when being setup. This ensure Home Assistant can communicate with more models of Mowers and with higher security levels.
Proposed change
All Automowers are setup with a 4 digit PIN. Depending the the model of the Automower and the security level set on the device by the user the PIN is required at boot and when performing certain operations.
The current Home Assistant integration doesn't require a PIN. It seems like higher security levels or certain models always require a PIN though. So the integration currently doesn't work for all models or configurations.
As such, let's request a PIN from users when setting up the integration so that we can use that for communicating with the mower. This should make the integration more robust for a range of different models and security levels as we can send the PIN as part of the BLE setup.
Fixes: #131321
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: