Fix type errors, decrease timeout, and handle files properly#14685
Closed
dfiel wants to merge 1 commit intohome-assistant:devfrom
Closed
Fix type errors, decrease timeout, and handle files properly#14685dfiel wants to merge 1 commit intohome-assistant:devfrom
dfiel wants to merge 1 commit intohome-assistant:devfrom
Conversation
fabaff
requested changes
Jun 1, 2018
| }) | ||
|
|
||
| MIN_TIME_BETWEEN_UPDATES = timedelta(minutes=1) | ||
| MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=5) |
Member
There was a problem hiding this comment.
For polling data over TCP this is very fast as there is no session used.
See dfiel/greenwavereality#1 for the request to add a timeout.
| import greenwavereality as greenwave | ||
| import os | ||
| host = config.get(CONF_HOST) | ||
| host = str(config.get(CONF_HOST)) |
Member
There was a problem hiding this comment.
This is not needed. The configuration validation only allows strings.
| self._host = str(host) | ||
| self._online = greenwave.check_online(light) | ||
| self._token = token | ||
| self._token = str(token) |
Member
There was a problem hiding this comment.
This should be fixed upstream.
Member
|
This PR seems to gone stale. Please re-open it when you want to proceed. |
|
@fabaff 👋 - I've just made your suggested changes, trying to figure out how to test this and get things back up and running. any pointers appreciated. |
|
@fabaff bump |
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.
Description:
Solves #11983 while merging #11942 into existing fixes.
Fixes type errors introduced with shared state object, decreases the timeout before the state object grabs new data from the controller, and integrated file handling fixes.
Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.