etheralm / libpurecool

Python library for dyson devices.
Other
68 stars 30 forks source link

Add call to account status endpoint before attempting to login to fix authentication. #38

Open bfayers opened 3 years ago

bfayers commented 3 years ago

This PR is based on the information form @shenxn here: https://github.com/etheralm/libpurecool/issues/37#issuecomment-777949022

I am also validating the account status in this to avoid unnecessary API calls to Dyson.

googanhiem commented 3 years ago

Will need to update the releases.rst just to ensure it passes the Hass PR requirements.

bfayers commented 3 years ago

Will need to update the releases.rst just to ensure it passes the Hass PR requirements.

I figured the release/update to the library would be a different PR - I can bounce the numbers to 0.6.5 in this PR if it's preferred.

homekitter commented 3 years ago

Will need to update the releases.rst just to ensure it passes the Hass PR requirements.

I figured the release/update to the library would be a different PR - I can bounce the numbers to 0.6.5 in this PR if it's preferred.

I suspect that an additional test for 'Must first check account status' should be included within https://github.com/etheralm/libpurecool/blob/master/tests/test_dyson_account.py:TestDysonAccount

timn commented 3 years ago

Can we get this merged and a release being published sometime soon? I think home-assistant users are waiting eagerly for this (home-assistant/core#46400). Thank you!

bfayers commented 3 years ago

Can we get this merged and a release being published sometime soon? I think home-assistant users are waiting eagerly for this (home-assistant/core#46400). Thank you!

Hopefully! I need to get the tests to pass but once I've done that it shouldn't be too difficult - however I wouldn't expect a merge here -- I'll probably end up having to publish it under another name on pypi (any ideas?) for now since I am willing to at least attempt to keep the library functional.

homekitter commented 3 years ago

@bfayers Thank you for all the great work that you've done. Is the merge blocked by the coveralls check? Have you approached @etheralm to taking over the project?

bfayers commented 3 years ago

@bfayers Thank you for all the great work that you've done. Is the merge blocked by the coveralls check?

Possibly - that said I don't think etheralm is particularly interested in merging & maintaining anymore

Have you approached @etheralm to taking over the project?

No, though I may just publish my fork to pypi and PR hass to move over. :/