Fix enabling/disabling automations.#82
Merged
MisterWil merged 1 commit intoMisterWil:masterfrom Jun 16, 2021
sarvjeets:fix-activate-automation
Merged
Fix enabling/disabling automations.#82MisterWil merged 1 commit intoMisterWil:masterfrom sarvjeets:fix-activate-automation
MisterWil merged 1 commit intoMisterWil:masterfrom
sarvjeets:fix-activate-automation
Conversation
1 similar comment
Contributor
Author
|
@MisterWil Please let me know if you need anything from my side to review this pull request. Thanks |
Owner
|
Thanks for fixing this! Do you need a new version pushed out too? |
Contributor
Author
|
Thank you. Yes, that would be great. |
Owner
|
abodepy-1.2.2 is now available via pypi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed that enabling/disabling automations was broken as 'set_active' method was renamed to 'enable'. With this change, I'm able to enable/disable the Abode automations.
Without this change:
$ abodepy -u ... -p ... --deactivate xxx
2021-05-10 10:51:52 INFO (MainThread) [abodepy] Updating all devices...
2021-05-10 10:51:52 INFO (MainThread) [abodepy] Login successful
2021-05-10 10:51:52 INFO (MainThread) [abodepy] Updating all automations...
2021-05-10 10:51:53 INFO (MainThread) [abodepy] Logout successful
Traceback (most recent call last):
File "/home/sarvjeet/.local/bin/abodepy", line 8, in
sys.exit(main())
File "/home/sarvjeet/.local/lib/python3.8/site-packages/abodepy/main.py", line 454, in main
call()
File "/home/sarvjeet/.local/lib/python3.8/site-packages/abodepy/main.py", line 339, in call
if automation.set_active(False):
AttributeError: 'AbodeAutomation' object has no attribute 'set_active'
$
With this change:
$ abodepy -u ... -p ... --deactivate xxx
2021-05-10 22:09:33 INFO (MainThread) [abodepy] Updating all devices...
2021-05-10 22:09:33 INFO (MainThread) [abodepy] Login successful
2021-05-10 22:09:33 INFO (MainThread) [abodepy] Updating all automations...
2021-05-10 22:09:33 INFO (MainThread) [abodepy.automation] Set automation XXX enable to: False
2021-05-10 22:09:33 INFO (MainThread) [abodecl] Deactivated automation with id: xxx
2021-05-10 22:09:34 INFO (MainThread) [abodepy] Logout successful
$
Thanks.