From 109f51dc4f8b7c700455e7531b5fc53a2005539b Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Tue, 4 Feb 2020 04:07:36 -0500 Subject: [PATCH 1/3] Update Vizio docs to reflect improved discovery (#11935) * update discovery and pairing instructions, clarify configuration options * close code markup * fix markdown * small tweaks to hopefully get build to pass * adhere to guidelines * try removing block quote * Update source/_integrations/vizio.markdown Co-Authored-By: Franck Nijhof * Update source/_integrations/vizio.markdown Co-Authored-By: Franck Nijhof * readd block quote and make it clear users should be on the latest version of pyvizio Co-authored-by: Franck Nijhof --- source/_integrations/vizio.markdown | 39 +++++++++++------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/source/_integrations/vizio.markdown b/source/_integrations/vizio.markdown index 9acaa316269..a56a1f18770 100644 --- a/source/_integrations/vizio.markdown +++ b/source/_integrations/vizio.markdown @@ -14,30 +14,21 @@ The `vizio` integration allows you to control [SmartCast](https://www.vizio.com/ ## Find your device -Install the command line tool using `pip` (or download it manually): +### Install pyvizio locally -```bash -$ pip3 install pyvizio -``` +> NOTE: If the `pip3` command is not found, try `pip` instead -or +- To install, run `pip3 install pyvizio` in your terminal. +- If `pyvizio` is already installed locally, make sure you are using the latest version by running `pip3 install --upgrade pyvizio` in your terminal. -```bash -$ pip3 install git+https://github.com/vkorn/pyvizio.git@master -``` - -or - -```bash -$ pip3 install -I . -``` +### Discover devices Find your device using the following command: -```txt -pyvizio --ip=0 discover +```bash +$ pyvizio --ip=0 discover ``` -and note its IP address. If using the IP address by itself does not work, you may need to append `:9000` or `:7345` to it when using it as a parameter in future commands. +and note its IP address and port number. If you have trouble finding a device you were expecting to, you can try increasing the discovery timeout period by adding the `--timeout` option (e.g. `pyvizio --ip=0 discover --timeout=10`). ## Pairing @@ -49,13 +40,13 @@ Make sure that your device is on before continuing. | Parameter | Description | |:----------------|:---------------------| -| `ip` | IP address (possibly including port) obtained from the previous section | +| `ip` | `IP Address:Port` (obtained from the previous section) | | `device_type` | The type of device you are connecting to. Options are `tv` or `soundbar` | Enter the following command to initiate pairing: ```bash -$ pyvizio --ip={ip} --device_type={device_type} pair +$ pyvizio --ip={ip:port} --device_type={device_type} pair ``` Initiation will show you two different values: @@ -68,7 +59,7 @@ Initiation will show you two different values: At this point, a PIN code should be displayed at the top of your TV. With all these values, you can now finish pairing: ```bash -$ pyvizio --ip={ip} --device_type={device_type} pair-finish --token={challenge_token} --pin={pin} +$ pyvizio --ip={ip:port} --device_type={device_type} pair-finish --token={challenge_token} --pin={pin} ``` You will need the authentication token returned by this command to configure Home Assistant. @@ -81,13 +72,13 @@ To add your Vizio TV to your installation, add the following to your `configurat # Example configuration.yaml entry media_player: - platform: vizio - host: IP_ADDRESS - access_token: AUTH_TOKEN + host: "DEVICE_IP:DEVICE_PORT" + access_token: YOUR_AUTH_TOKEN ``` {% configuration %} host: - description: IP address of your device. + description: "`IP Address:Port` for your device (port is optional but recommended)." required: true type: string access_token: @@ -95,7 +86,7 @@ access_token: required: false type: string device_class: - description: The class of your device. Valid options are `tv` or `soundbar` + description: "The class of your device. Valid options are `tv` or `soundbar`." required: false type: string default: tv From 25f42c77451fce8c5e3796e6688ccbdd79faac49 Mon Sep 17 00:00:00 2001 From: John Males Date: Tue, 4 Feb 2020 20:11:04 +1100 Subject: [PATCH 2/3] Update pvoutput.markdown (#11965) * Update pvoutput.markdown Replaced some single quotes with double quotes in the pvoutput template. Current template throwing errors similar to these (line numbers will vary based on configuration.yaml file: ``` Configuration invalid CHECK CONFIG Error loading /config/configuration.yaml: while parsing a block mapping in "/config/configuration.yaml", line 408, column 9 expected , but found '' in "/config/configuration.yaml", line 408, column 56 ``` Updated template configuration fixes these errors. * :pencil2: Tweak Co-authored-by: Franck Nijhof --- source/_integrations/pvoutput.markdown | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/_integrations/pvoutput.markdown b/source/_integrations/pvoutput.markdown index 132c332dc70..6be1310a183 100644 --- a/source/_integrations/pvoutput.markdown +++ b/source/_integrations/pvoutput.markdown @@ -47,6 +47,8 @@ It's recommended to set `scan_interval:` according to a value greater than 60 se To format the PVoutput sensor it's recommended to use the [template component](/topics/templating/). For example: +{% raw %} + ```yaml sensor: - platform: pvoutput @@ -56,19 +58,21 @@ sensor: - platform: template sensors: power_consumption: - value_template: {% raw %}'{% if is_state_attr("sensor.pvoutput", "power_consumption", "NaN") %}0{% else %}{{ state_attr('sensor.pvoutput', 'power_consumption') }}{% endif %}'{% endraw %} + value_template: '{% if is_state_attr("sensor.pvoutput", "power_consumption", "NaN") %}0{% else %}{{ state_attr("sensor.pvoutput", "power_consumption") }}{% endif %}' friendly_name: 'Using' unit_of_measurement: 'Watt' energy_consumption: - value_template: {% raw %}'{{ "%0.1f"|format(state_attr('sensor.pvoutput', 'energy_consumption')|float/1000) }}'{% endraw %} + value_template: '{{ "%0.1f"|format(state_attr("sensor.pvoutput", "energy_consumption")|float/1000) }}' friendly_name: 'Used' unit_of_measurement: 'kWh' power_generation: - value_template: {% raw %}'{% if is_state_attr("sensor.pvoutput", "power_generation", "NaN") %}0{% else %}{{ state_attr('sensor.pvoutput', 'power_generation') }}{% endif %}'{% endraw %} + value_template: '{% if is_state_attr("sensor.pvoutput", "power_generation", "NaN") %}0{% else %}{{ state_attr("sensor.pvoutput", "power_generation") }}{% endif %}' friendly_name: 'Generating' unit_of_measurement: 'Watt' energy_generation: - value_template: {% raw %}'{% if is_state_attr("sensor.pvoutput", "energy_generation", "NaN") %}0{% else %}{{ "%0.2f"|format(state_attr('sensor.pvoutput', 'energy_generation')|float/1000) }}{% endif %}'{% endraw %} + value_template: '{% if is_state_attr("sensor.pvoutput", "energy_generation", "NaN") %}0{% else %}{{ "%0.2f"|format(state_attr("sensor.pvoutput", "energy_generation")|float/1000) }}{% endif %}' friendly_name: 'Generated' unit_of_measurement: 'kWh' ``` + +{% endraw %} From 8aab53055a7eedc7bd71aa868a70de412af511d0 Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Tue, 4 Feb 2020 08:34:52 -0600 Subject: [PATCH 3/3] Add missing icon option for light-card (#11967) --- source/_lovelace/light.markdown | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/_lovelace/light.markdown b/source/_lovelace/light.markdown index 7f47b443c6a..36d2a53f626 100644 --- a/source/_lovelace/light.markdown +++ b/source/_lovelace/light.markdown @@ -30,6 +30,11 @@ name: description: Overwrites friendly name. type: string default: Name of Entity +icon: + required: false + description: Overwrites icon. + type: string + default: Entity Domain Icon theme: required: false description: Set to any theme within `themes.yaml`.