mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 20:55:10 +02:00
Adjust homekit controller pairing errors back to a single step
This commit is contained in:
@@ -307,15 +307,8 @@ class HomekitControllerFlowHandler(config_entries.ConfigFlow):
|
||||
self.finish_pairing = None
|
||||
errors["pairing_code"] = "pairing_failed"
|
||||
|
||||
if errors and "base" in errors:
|
||||
return self.async_show_form(step_id="try_pair_later", errors=errors)
|
||||
|
||||
return self._async_step_pair_show_form(errors)
|
||||
|
||||
async def async_step_try_pair_later(self, pair_info=None):
|
||||
"""Retry pairing after the accessory is busy or unavailable."""
|
||||
return await self.async_step_pair(pair_info)
|
||||
|
||||
@callback
|
||||
def _async_step_pair_show_form(self, errors=None):
|
||||
return self.async_show_form(
|
||||
|
@@ -16,20 +16,16 @@
|
||||
"data": {
|
||||
"pairing_code": "Pairing Code"
|
||||
}
|
||||
},
|
||||
"try_pair_later": {
|
||||
"title": "Pairing Unavailable",
|
||||
"description": "Ensure the device is in pairing mode or try restarting the device, then continue to re-start pairing."
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"unable_to_pair": "Unable to pair, please try again.",
|
||||
"unknown_error": "Device reported an unknown error. Pairing failed.",
|
||||
"protocol_error": "Error communicating with the accessory. Device may not be in pairing mode and may require a physical or virtual button press.",
|
||||
"protocol_error": "Error communicating with the accessory. The device may not be in pairing mode and may require a physical or virtual button press. Ensure the device is in pairing mode or try restarting the device, then continue to resume pairing.",
|
||||
"authentication_error": "Incorrect HomeKit code. Please check it and try again.",
|
||||
"max_peers_error": "Device refused to add pairing as it has no free pairing storage.",
|
||||
"busy_error": "Device refused to add pairing as it is already pairing with another controller.",
|
||||
"max_tries_error": "Device refused to add pairing as it has received more than 100 unsuccessful authentication attempts.",
|
||||
"busy_error": "The device refused to add pairing as it is already pairing with another controller. Abort pairing on all controllers, or try restarting the device, then continue to resume pairing.",
|
||||
"max_tries_error": "The device refused to add pairing as it has received more than 100 unsuccessful authentication attempts. Try restarting the device, then continue to resume pairing.",
|
||||
"pairing_failed": "An unhandled error occurred while attempting to pair with this device. This may be a temporary failure or your device may not be supported currently."
|
||||
},
|
||||
"abort": {
|
||||
|
@@ -16,20 +16,16 @@
|
||||
"data": {
|
||||
"pairing_code": "Pairing Code"
|
||||
}
|
||||
},
|
||||
"try_pair_later": {
|
||||
"title": "Pairing Unavailable",
|
||||
"description": "Ensure the device is in pairing mode or try restarting the device, then continue to re-start pairing."
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"unable_to_pair": "Unable to pair, please try again.",
|
||||
"unknown_error": "Device reported an unknown error. Pairing failed.",
|
||||
"protocol_error": "Error communicating with the accessory. Device may not be in pairing mode and may require a physical or virtual button press.",
|
||||
"protocol_error": "Error communicating with the accessory. The device may not be in pairing mode and may require a physical or virtual button press. Ensure the device is in pairing mode or try restarting the device, then continue to resume pairing.",
|
||||
"authentication_error": "Incorrect HomeKit code. Please check it and try again.",
|
||||
"max_peers_error": "Device refused to add pairing as it has no free pairing storage.",
|
||||
"busy_error": "Device refused to add pairing as it is already pairing with another controller.",
|
||||
"max_tries_error": "Device refused to add pairing as it has received more than 100 unsuccessful authentication attempts.",
|
||||
"busy_error": "The device refused to add pairing as it is already pairing with another controller. Abort pairing on all controllers, or try restarting the device, then continue to resume pairing.",
|
||||
"max_tries_error": "The device refused to add pairing as it has received more than 100 unsuccessful authentication attempts. Try restarting the device, then continue to resume pairing.",
|
||||
"pairing_failed": "An unhandled error occurred while attempting to pair with this device. This may be a temporary failure or your device may not be supported currently."
|
||||
},
|
||||
"abort": {
|
||||
|
Reference in New Issue
Block a user