-
-
Notifications
You must be signed in to change notification settings - Fork 227
Handle module errors more robustly and add query params to light preset and transition #1036
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
Changes from all commits
ec1d827
3cfb689
291e102
ce4aaf9
39e3d05
92d8031
4ede248
79e1f66
ba95156
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,12 +19,6 @@ class AutoOff(SmartModule): | |
|
||
def _initialize_features(self): | ||
"""Initialize features after the initial update.""" | ||
if not isinstance(self.data, dict): | ||
_LOGGER.warning( | ||
"No data available for module, skipping %s: %s", self, self.data | ||
) | ||
return | ||
|
||
Comment on lines
-22
to
-27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No longer required or reachable as the |
||
self._add_feature( | ||
Feature( | ||
self._device, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,10 @@ def _initialize_features(self): | |
) | ||
) | ||
|
||
def query(self) -> dict: | ||
"""Query to execute during the update cycle.""" | ||
return {} | ||
|
||
Comment on lines
+46
to
+49
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A lot of the hub child devices appear to incorrectly expose a module query even though they don't call/access any modules. In order to support the |
||
@property | ||
def battery(self): | ||
"""Return battery level.""" | ||
|
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.
This still needs to be tested as working with the affected devices. Will send an empty
{}
instead ofnull
for params.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.
get_on_off_gradually_info
now confirmed as working in #1033