Improve netgear_lte logging when unconnected#18163
Merged
MartinHjelmare merged 2 commits intohome-assistant:devfrom Nov 4, 2018
Merged
Improve netgear_lte logging when unconnected#18163MartinHjelmare merged 2 commits intohome-assistant:devfrom
MartinHjelmare merged 2 commits intohome-assistant:devfrom
Conversation
7 tasks
MartinHjelmare
approved these changes
Nov 3, 2018
Member
MartinHjelmare
left a comment
There was a problem hiding this comment.
Nice! Two possible changes.
| self.unread_count = sum(1 for x in information.sms if x.unread) | ||
| self.usage = information.usage | ||
| if not self.connected: | ||
| _LOGGER.warning("Connected to %s", self.host) |
Contributor
Author
There was a problem hiding this comment.
I think it should match the warnings for lost connections so it is clear that the problem is resolved even if the log file filters out info level logs.
(Note that it does not print during normal startup, only after connection failures.)
| retry_task = hass.loop.create_task( | ||
| _retry_login(hass, modem_data, password)) | ||
|
|
||
| async def cleanup_retry(event): |
Member
There was a problem hiding this comment.
This could be a callback.
Contributor
Author
There was a problem hiding this comment.
Good point, I changed that.
MartinHjelmare
approved these changes
Nov 4, 2018
Merged
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:
Checklist:
tox.If the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.