Support vizio pairing through config flow (#31520)
* support pairing through config flow * simplify import failure log messages * remove unnecessary list comprehension * bump pyvizio to add passing ClientSession in where it was missed * show different message if user completes pairing through import * remove dupe failure message since reasons for failure are the same in both instances * remove extra constant * add host reachability check during pairing workflow * revert redundant connection check since check is implicitly done during pairing process * fix rebase errors * fix string * updates based on review * update docstring * missed commit * update import confirmation message to be less wordy * use ConfigFlow _abort_if_unique_id_configured * fix test
This commit is contained in:
1 parent
03d8abe1ba
commit
b9fa32444a
6 files changed
+388
-67
No files matched your search
@@ -4,23 +4,38 @@
|
||||
"step": {
|
||||
"user": {
|
||||
"title": "Setup Vizio SmartCast Device",
|
||||
"description": "All fields are required except Access Token. If you choose not to provide an Access Token, and your Device Type is 'tv', you will go through a pairing process with your device so an Access Token can be retrieved.\n\nTo go through the pairing process, before clicking Submit, ensure your TV is powered on and connected to the network. You also need to be able to see the screen.",
|
||||
"data": {
|
||||
"name": "Name",
|
||||
"host": "<Host/IP>:<Port>",
|
||||
"device_class": "Device Type",
|
||||
"access_token": "Access Token"
|
||||
}
|
||||
},
|
||||
"pair_tv": {
|
||||
"title": "Complete Pairing Process",
|
||||
"description": "Your TV should be displaying a code. Enter that code into the form and then continue to the next step to complete the pairing.",
|
||||
"data": {
|
||||
"pin": "PIN"
|
||||
}
|
||||
},
|
||||
"pairing_complete": {
|
||||
"title": "Pairing Complete",
|
||||
"description": "Your Vizio SmartCast device is now connected to Home Assistant."
|
||||
},
|
||||
"pairing_complete_import": {
|
||||
"title": "Pairing Complete",
|
||||
"description": "Your Vizio SmartCast device is now connected to Home Assistant.\n\nYour Access Token is '**{access_token}**'."
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"host_exists": "Vizio device with specified host already configured.",
|
||||
"name_exists": "Vizio device with specified name already configured.",
|
||||
"cant_connect": "Could not connect to the device. [Review the docs](https://www.home-assistant.io/integrations/vizio/) and re-verify that:\n- The device is powered on\n- The device is connected to the network\n- The values you filled in are accurate\nbefore attempting to resubmit.",
|
||||
"tv_needs_token": "When Device Type is `tv` then a valid Access Token is needed."
|
||||
"complete_pairing failed": "Unable to complete pairing. Ensure the PIN you provided is correct and the TV is still powered and connected to the network before resubmitting.",
|
||||
"cant_connect": "Could not connect to the device. [Review the docs](https://www.home-assistant.io/integrations/vizio/) and re-verify that:\n- The device is powered on\n- The device is connected to the network\n- The values you filled in are accurate\nbefore attempting to resubmit."
|
||||
},
|
||||
"abort": {
|
||||
"already_setup": "This entry has already been setup.",
|
||||
"already_setup_with_diff_host_and_name": "This entry appears to have already been setup with a different host and name based on its serial number. Please remove any old entries from your configuration.yaml and from the Integrations menu before reattempting to add this device.",
|
||||
"updated_entry": "This entry has already been setup but the name and/or options defined in the configuration do not match the previously imported configuration, so the configuration entry has been updated accordingly."
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user