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
Vizio SmartCast support #8260
Vizio SmartCast support #8260
Conversation
@vkorn, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob, @fabaff and @robbiet480 to be potential reviewers. |
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.
Just some quick comments
host = config.get(CONF_HOST) | ||
if host is None: | ||
_LOGGER.error('No host info') | ||
return False |
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.
That's covered by the configuration validation. CONF_HOST
will never been None
.
token = config.get(CONF_ACCESS_TOKEN) | ||
if token is None: | ||
_LOGGER.error('No token info') | ||
return False |
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.
Dito
from homeassistant.helpers import config_validation as cv | ||
|
||
REQUIREMENTS = ['git+https://github.com/vkorn/pyvizio.git' | ||
'@master#pyvizio==0.0.1'] |
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.
Can you publish your module at PyPI?
return False | ||
name = config.get(CONF_NAME) | ||
|
||
add_devices([VizioDevice(host, token, name)], True) |
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.
Checking that the host is reachable and the token valid before setting up the platform would help that the users don't end up with a non-functional platform in their setup.
It looks like this branch got messed up. Can you clean up the unrelated commits? |
Added new config params
Added new config params
* Vizio SmartCast support * Requested changes Added new config params * Vizio SmartCast support * Requested changes Added new config params
Description:
Support of newer Vizio TV models (with SmartCast capabilities).
One annoying thing: Vizio serving https without certificate, so lot of warnings will be in the log if loglevel is low. As an option -- proxy requests through nginx.
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#2906
Example entry for
configuration.yaml
(if applicable):Checklist:
If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
tox
run successfully. Your PR cannot be merged unless tests passREQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.