deCONZ - Fix service device refresh calling state update#30920
Merged
balloob merged 1 commit intoJan 17, 2020
Merged
Conversation
balloob
reviewed
Jan 17, 2020
| @callback | ||
| def async_update_callback(self): | ||
| def async_update_callback(self, ignore_update=False): | ||
| """Sensor state updated.""" |
Member
There was a problem hiding this comment.
Shouldn't you check here for ignore_update too ?
Member
Author
There was a problem hiding this comment.
No it is just tracker for battery sensors, by not evaluating ignore_update we increase the chance of creating new battery sensors which would be a good thing :)
balloob
reviewed
Jan 17, 2020
| def async_update_callback(self, force_update=False, ignore_update=False): | ||
| """Update the sensor's state.""" | ||
| changed = set(self._device.changed_keys) | ||
| if ignore_update: |
Member
There was a problem hiding this comment.
This seems kinda weird. Wouldn't it be possible to just not call async_update_callback if ignore_update is True ?
Member
Author
There was a problem hiding this comment.
My thought was to not have that logic in the library, but you think that would be better?
balloob
approved these changes
Jan 17, 2020
Member
balloob
left a comment
There was a problem hiding this comment.
Going to merge this for the hotfix, we can discuss the comment afterwards.
Member
Author
|
@fastender it works here, be a bit more constructive please |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description:
Unintentional behavioural change when updating data management in pydeconz. This allows controlling whether or not an update should be ignored.
Related issue (if applicable): fixes #30890
Checklist:
tox. Your PR cannot be merged unless tests pass